Project: AspectJ
Bug 61411 AJDoc launch script on Windows can lose arguments
Reported: 2004-05-07 12:00:01 | Status: resolved fixed

Using AspectJ 1.2rc1 on Windows XP This report highlights a problem that I've seen using ajdoc.bat on Windows but the issue applies equally to the ajc.bat and ajbrowser.bat files as well. The %ASPECTJ_HOME%\bin\ajdoc.bat file that users run to launch the ajdoc tool imposes a limit of only 9 command line arguments that may be passed to the class org.aspectj.tools.ajdoc.Main. In scenarios where there the -sourcepath, -classpath, -d etc options are used it is easy for these to "eat up" the list of arguments that are passed into the JVM. A long list of packages entered at the end of the ajdoc.bat command can be truncated or possibly even ignored (in which case an error message will be output telling the user that no classes or packages have been specified). In order to prevent a limit being put on the number of arguments passed to the launched JVM, the invocation line needs to end with %* rather than the %1 %2 %3 %4 %5 %6 %7 %8 %9 list it currently uses. The proposed fix also *seems* (could somebody else confirm this ?) to sort out another problem regarding the ajdoc.bat file which is this : long semi- colon delimited paths supplied as the arguments for the -sourcepath and -classpath options seem to get split apart and passed into the JVM as separate arguments unless the entire path list is supplied inside quotes. This should not be necessary. It seems that the batch file processor interprets the semi-colons in a path list as delimiters between arguments. Consequently each element in the path list is treated as a separate argument instead of being part of one big string representing the sourcepath or classpath.

Files changed in fix:
build/src/$installer$/org/aspectj/Main.java