pass all the jars in classpath when compiling java

How to pass multiple jar files while using javac – compiling java classes

If you have single jar file, you can pass as: lets assume you are compiling file.java

javac path/to/file.java -classpath "path/to/jar/file.jar" -d classpath

But how about if you have multiple jar files to be included in the class path?

If you are on windows you can list the jar files separated by semi colon(;) and in unix you can pass with colon(:)

javac path/to/java/file.java -classpath "file1.jar:file2.jar:dir/*"

The last example is for unix environment but you can apply it to windows with proper path and semicolon

setting JAVA_HOME on mac osx

hello world weblogic – hello world tutorial on weblogic

Passing composite object parameter to jersey in Restful Java web

J2EE Maven Eclipse Hello World Tutorial Part Two

Check if two strings are anagrams or not

Java Tomcat error: can not access a member of class with modifiers

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*