Bug 30766 - -classpath is not uniform with javac/java
Summary: -classpath is not uniform with javac/java
Status: REOPENED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 98
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-01 11:12 EST by Rafael Chaves CLA
Modified: 2009-08-30 02:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2003-02-01 11:12:51 EST
AspectJ compiler 1.1beta4

AspectJ compiler does not seem to properly accept multiple directory/JAR path 
entries in the -classpath option.

The following command line:

ajc -classpath bin;c:\aspectj1.1\lib\aspectjrt.jar -sourceroots src -d bin  

Generates the following error message:

invalid option or directory does not exist: c:\aspectj1.1\lib\aspectjrt.jar

While inverting the paths:

ajc -classpath c:\aspectj1.1\lib\aspectjrt.jar;bin -sourceroots src -d bin  

produces the same stack trace as bug 30765.
Comment 1 Wes Isberg CLA 2003-02-07 03:08:52 EST
Try quoting the classpath.  I'm not sure how your shell is handling the internal
';'. (The message instead suggests that the aspectjrt.jar does not exist, but I
assume you verified that.)

I tried this in 1.1beta4 and it worked for me from the DOS command line.  (I
thought it would not because the classpath entry is not quoted.)  (From a cygwin
bash command line, the backslashes need to be escaped and the classpath entries
need to be quoted.)  Here's the DOS command that worked:

J:\home\wes\dev\tools\aj>.\bin\ajc -classpath
bin;j:\home\wes\dev\tools\aj\lib\aspectjrt.jar -sourceroots doc/examples/bean -d bin

If either quoting or correcting the path works for you, feel free to close the bug.
Comment 2 Jim Hugunin CLA 2003-02-13 12:45:23 EST
I believe that Wes's suggestion of quoting the classpath fixes this bug.  This 
is a result of using a batch file to call the compiler instead of the .exe 
that java uses.  Fixing this bug would be a huge amount of work in return for 
a very small usability gain.  It's being marked as P5 and a request for 
enhancement.
Comment 3 Rafael Chaves CLA 2003-02-13 13:41:30 EST
Sorry, I had problems with my connection when trying to add my answer to Wes' 
comments some time ago, and forgot to try again later.

You are right, the problem does not happen when passing the arguments between 
quotes. Thanks.


Comment 4 Wes Isberg CLA 2003-05-08 01:13:43 EDT
This should now be resolved as INVALID rather than LATER.
Comment 5 Eclipse Webmaster CLA 2009-08-30 02:48:34 EDT
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.