| Author |
problem with running jar file
|
oriakhi joseph
Greenhorn
Joined: Oct 06, 2011
Posts: 12
|
|
|
i converted my class file to .jar file but when i double click on the file its does not run, gives an error: a java exception has occured, when trying to open it with the jvm
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
How did you convert your class in .jar file? Does your class contain a main method and did you include a MANIFEST.MF file in the jar to tell the JVM which class to invoke when the jar file is run?
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
oriakhi joseph
Greenhorn
Joined: Oct 06, 2011
Posts: 12
|
|
|
yes my class contains a main method, and i used this command : jar cvf Sample.jar*.class , please help me out , i dont know of the manifest file
|
 |
Kaydell Leavitt
Ranch Hand
Joined: Nov 18, 2006
Posts: 679
|
|
|
You can look inside of you .jar file by changing the extension from .jar to .zip and then unzipping the file and looking into it.
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
oriakhi you can read about manifest files here. You'll specifically need to do this...
|
 |
 |
|
|
subject: problem with running jar file
|
|
|