Alex Rivera | Logout

How to include jar files with java file and compile in command prompt

Asked 2012-02-22T12:57:35.660
169

I have 3 jar files and a .java file that depends on these jar files. How do I compile the .java file with these jar files using a command prompt?

Edit
Report

1 Answer

27

Syntax will work on windows dos command:

javac -cp ".;first.jar;second.jar;third.jar" MyJavaFile.java
answered 2013-07-11T15:19:40.877

Your Answer