Open GoogleCodeExporter opened 9 years ago
From Jonathan:
There are a few issues at play:
1. Unlike bootclasspaths, classpath arguments don't have an option to
prepend/append.
2. The last -classpath argument read takes precedence over all previous ones.
3. Users can specify any number of @arg.files.
4. Options in arg files are escaped like Java strings, not like shell
commands, i.e., they are not expanded by the shell.
5. One of the reasons people read arg files is that the resulting options
might be too long for the command line, especially under Windows.
Probably, the best way to handle this is:
1. Read the arg files in reverse order.
2. Find the first instance of a classpath argument.
3. Prepend to that classpath argument our checker.jar
4. Copy the original arg-file into a new arg-file in tmp but replace the
classpath with the one determined in step 3.
5. Pass the new arg file in place of the old.
Original comment by michael.ernst@gmail.com
on 28 Aug 2014 at 8:13
Original issue reported on code.google.com by
Jonathan...@gmail.com
on 7 Jan 2013 at 3:36