Software >> Development >> Languages >> Java >> How to specify the classpath to .jar files in the command line when compiling or executing

When executing .class file(s) ----------------------------- java -classpath path-to-first.jar;path-to-second.jar;some-class-dir;. When compiling .class files(s) ------------------------------ javac -classpath path-to-first.jar;path-to-second.jar;some-class-dir;. Note: The last path "." means current directory included in the classpath