by @kodeazy
Java How to include multiple jar files in class path using command prompt during compilation of java code?
- I have multiple jar files
- To include all these jar files in class path while compiling through command prompt.
-
Below is the syntax.
javac -cp <Path of jarfile and jar file name>:<Path of jarfile and jar file name> fileName.java
Below is the example
javac -cp E:/java-jar-fileslog4j-api-2.17.2.jar:E:/java-jar-fileslog4j-core-2.17.2.jar B.java