• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why my .jar file wont run ?  RSS feed

 
Serban Cameron
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I made a small program in netbeans and it wont run. I have installed JRE. It doesnt say anything it just doesnt start if I double click it. I tried in cmd to start it. HAve you got any ideas ?
 
Paweł Baczyński
Bartender
Posts: 2047
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you run it from the console?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try running it from the command line.
Open terminal window
Navigate to jar file location
Type java -jar {jar_file_name}.jar
Hit return

The console window will tell you what went wrong. You can copy paste the output here (please UseCodeTags) so we can take a look
 
Serban Cameron
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesnt say anything

Ill post it here:

C:\Users\serban\Documents\NetBeansProjects\Frame\dist>java -jar Frame.jar   (i hit enter)
C:\Users\serban\Documents\NetBeansProjects\Frame\dist>                          

It doesnt give me any error nothing
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16009
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your code look like, especially the main() method?
 
Serban Cameron
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It`s a JFrame that i did in Swing. Here is the code:

 
Serban Cameron
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded a jar from git hub and it works so the problem is on my side. None of my apps made in Swing work. Why ?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your jar self executable?
Does the manifest file contain such an entry?

More info about it here http://docs.oracle.com/javase/tutorial/deployment/jar/appman.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!