THis is the usual way of compiling using javac
javac .;C:Users\xxx\ . . ; another jar; another jar . . . ; MyTest.java
Is there any way to put the list of references in an external xml
, the same way Eclipse does .classpath
, and refer to this file rather than list all the external jars in -classpath
cmd?
You can use a script instead of retyping this command line each time. Another option is the CLASSPATH environment variable but you'll need to be careful not to set it globally (the doc specifically recommends using -cp
instead of the environment variable).
You could write your own launcher that takes an XML file, converts it into a classpath string, and then launches java with the correct classpath argument.