| Author |
problem in running jar file
|
sagar khana
Greenhorn
Joined: Jan 15, 2012
Posts: 21
|
|
howdy
hey i am having problem in running jar file when i double click it says error as shows in fig i have added main class but still its keep coming please show me some guidance
thank you very much for your help
god bless you
|
 |
Greg Brannon
Bartender
Joined: Oct 24, 2010
Posts: 530
|
|
|
I'm not able to see your figure. Please copy and paste the error message you're receiving exactly as it appears.
|
Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
|
 |
sagar khana
Greenhorn
Joined: Jan 15, 2012
Posts: 21
|
|
Greg Brannon wrote:I'm not able to see your figure. Please copy and paste the error message you're receiving exactly as it appears.
ok sorry
here what it is written:
"A java exception has occured."
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Run the JAR file from the command line using java -jar, that way you'll get to see the actual exception / error.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
|
Is the program in the .jar something you coded or someone elses's code?
|
luck, db
There are no new questions, but there may be new answers.
|
 |
sagar khana
Greenhorn
Joined: Jan 15, 2012
Posts: 21
|
|
thank you so much for your reply
Rob Spoor wrote:Run the JAR file from the command line using java -jar, that way you'll get to see the actual exception / error.
ya i tried it says following error:
Exception in thread main java.lang.NullPointerException
at sun.launcher.LauncherHelper.getMainClassFromJar<Unkown Source>
at sun.launcher.LauncherHelper.checkAndLoadMain<Unkown Source>
i have added main class in txt file before making jar file and there were no error in program
when i make jar file using JOptionPane it runs ok but when i use my code it gives error
thank you
|
 |
sagar khana
Greenhorn
Joined: Jan 15, 2012
Posts: 21
|
|
thank you for your reply
Darryl Burke wrote:Is the program in the .jar something you coded or someone elses's code?
it is my code and its running perfect in .java file
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Please show us the contents of your MANIFEST.MF file.
|
 |
sagar khana
Greenhorn
Joined: Jan 15, 2012
Posts: 21
|
|
Thanks for your reply
Rob Spoor wrote:Please show us the contents of your MANIFEST.MF file.
this is the content in Mainfest.mf
Manifest-Version: 1.0
Created-By: 1.7.0_01 (Oracle Corporation)
thank you very much
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Where is the Main-Class entry? Without that, a JAR file is not an executable JAR file.
|
 |
 |
|
|
subject: problem in running jar file
|
|
|