Compiling Java With an External Jar From the Command Line
It took me a while to firgure this out, but I’m sure someone else will find it useful. In order to compile from the command line, you need to set the classpath of the jar, when you compile, and run the class. Here is an example:
javac -classpath .:/pathtojar/jarname.jar ClassName.java
java -classpath .:/pathtojar/jarname.jar ClassName
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.