Search This Blog

Java add all jar files in a directory to classpath

javac -cp "../lib1.jar;../lib/*" Main.java
java -cp "../lib1.jar;../lib/*" Main

NOTE:

  • Must use quotes
  • * not *.jar

No comments:

Post a Comment