Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dot jar (.jar) files and linux classpath

843789Aug 4 2010 — edited Aug 4 2010
I have a java program that requires two jar files for successful compilation, how do i do this?
when i use one jar file i would compile my program in the following manner

javac -classpath /usr/local/java/classes/mysql-connector-java.jar:. ClassName.java

and run it with java -classpath /usr/local/java/classes/mysql-connector-java.jar:. ClassName

but what would the above compilation and run statements look like if i had to use two .jar files?


ps forgot the code tag syntax
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2010
Added on Aug 4 2010
2 comments
409 views