include external jar when running java -jar
- by prmatta
From my readings, when you execute a command as follows:
java -jar foo.jar
Then the main classpath is ignored and the classpath is taken from the manifest file.
Further, the classpath declared on the command line is also ignored. So in:
java -classpath /usr/local/jar/foobar.jar -jar foo.jar
/usr/local/jar/foobar.jar is ignored.
Lastly, I…