I have a helper lib that I wrote to sit on top of Apache Commons, and when I try to javac it (so that I can make it into a jar) it complains, quite reasonably, that it has no idea what I'm talking about when I make reference to the stuff that's in the commons.jar.
How does one include a jar so as that javac can compile?
For windows:
javac -cp ".;/dir/commons.jar;/dir/more_jar_files.jar" MyClass.java
For unix or mac (thanks for the tip Dawood):
javac -cp ".:/dir/commons.jar:/dir/more_jar_files.jar" MyClass.java
Which means:
javac -cp <path to jar> MyClass.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With