• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in running jar file

 
sagar khana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not able to see your figure. Please copy and paste the error message you're receiving exactly as it appears.
 
sagar khana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Run the JAR file from the command line using java -jar, that way you'll get to see the actual exception / error.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the program in the .jar something you coded or someone elses's code?
 
sagar khana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show us the contents of your MANIFEST.MF file.
 
sagar khana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the Main-Class entry? Without that, a JAR file is not an executable JAR file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic