Wednesday, May 18, 2005

JAR file and CLASSPATH

if you are using the following command to run a jar file and want to provide a classpath to the running jar file... the following command will NOT work..

java -classpath C:\test\classes -jar test.jar

The answer is..

CLASSPATH=C:\test\classes

java -XBootclasspath/a:%CLASSPATH% -jar test.jar

No comments:

Disqus for techtalk