Bug 72719 - ajc with -sourceroots does not support many dirs
Summary: ajc with -sourceroots does not support many dirs
Status: RESOLVED WORKSFORME
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.2.1   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-26 15:04 EDT by rajesh_pv CLA
Modified: 2004-10-21 04:31 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 rajesh_pv CLA 2004-08-26 15:04:32 EDT
When I run this , 
C:\aspectj1.2\self>ajc -sourceroots C:\self\a;C:\self\b;
I get error complaining about second set of dir where my aspect java files are 
there.
error as => error build config error: dir arg not permitted: C:\self\b

if I run as 
ajc -sourceroots C:\self\a;
then it runs cool, I think it should be a bug.

(run with jdk 1.4.2_05)

Thanks
-Rajesh
Comment 1 Andrew Clement CLA 2004-08-27 06:29:29 EDT
If you put quotes round the path it will work:

ajc -sourceroots "C:\self\a;C:\self\b;"

However - the quotes should not be necessary if you are on Windows XP.  

Please can you check in your c:\aspectj1.2\bin\ajc.bat file.  You should find
that the last line (which invokes ajc) looks like this:

"%JAVA_HOME%\bin\java" -classpath "%ASPECTJ_HOME%\lib\aspectjtools.jar;%JAVA_HOM
E%\lib\tools.jar;%CLASSPATH%" -Xmx64M org.aspectj.tools.ajc.Main %*

If it doesn't look like that, but looks like this:

"%JAVA_HOME%\bin\java" -classpath "%ASPECTJ_HOME%\lib\aspectjtools.jar;%JAVA_HOM
E%\lib\tools.jar;%CLASSPATH%" -Xmx64M org.aspectj.tools.ajc.Main %1 %2 %3 %4 %5
%6 %7 %8 %9

then you need quotes around paths you pass to ajc.

Can you confirm the operating system you are on? and which of the above versions
of ajc.bat you have?

I can't quite remember when we fixed this but it was around the time 1.2 was
shipped.  I presume you are running 1.2 final rather than any of the development
builds we have been producing lately?

thanks.
Comment 2 Andrew Clement CLA 2004-09-02 05:11:20 EDT
Have you had a chance to check the contents of your ajc.bat file to see if it
uses the "%*" or "%1 %2 etc" notation?  
Comment 3 Andrew Clement CLA 2004-09-07 09:43:48 EDT
I've just retried this with the latest 1.2.1 development build and the installed
batch file looks correct.  I'm going to close this bug - please reopen if you
continue to have problems...  Latest build is here:

BUILD COMPLETE -  build.371
Date of build: 09/07/2004 12:33:43
Time to build: 101 minutes 39 seconds
Last changed: 09/07/2004 11:47:45
Latest good AspectJ jar available at:
download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar
Comment 4 Adrian Colyer CLA 2004-10-21 04:31:33 EDT
Fix released as part of AspectJ 1.2.1