Browniez Browniez - 1 month ago 4
Java Question

Compiling multiple .jar files with .java class

I currently have a java class which I am attempting to compile using Linux terminal along with a folder (/libs) which contains about 9 .jar folders.
I am struggling trying to attempt this.
I am aware of how to compile a single library to a class:

javac -classpath /libs/example.jar

just unsure of how this can apply to multiple libraries.



You can either refer to an entire folder containing all the libraries such as javac -cp lib\*

Alternatively, you can refer individual libraries as such: javac -cp lib1\Library.jar;lib2\Library.jar (separate with semicolon)