jasimp
Senior Poster
3,623 posts since Aug 2007
Reputation Points: 533
Solved Threads: 53
if the jar you have is an executable jar, just doubling clicking on it should make it run, However if that doesn't work the at the command line type:
java -jar filename.jar
If that too doesn't work (which means the manifest file was not properly included with the jar), you will have to give specify the Main class of your jar. For example if the main class is Alpha inside the package "daniweb" which in turn is inside the package "com", you will have to type:
java -cp filename.jar com.daniweb.Alpha
Also here is the chapter from The Java Tutorials covering the basics and uses of Jar files.
stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154