• Post Reply Bookmark Topic Watch Topic
  • New Topic

jar file  RSS feed

 
Jimmian Lin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm trying to open an executable jar file. However, it won't open even after me double-clicking it. Is there something else I'm supposed to do to open it?
 
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
Run the jar from the command prompt by
java -jar MyJar.jar where "MyJar" is your jar file name.
You will get a stack trace on the console, which will tell you what is going wrong.

Are you sure it is a self executable jar? (The jar's manifest file has a Main-Class attribute)
Remember, all jars need not be self executable!
 
Sunil Kumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed with all Manish said!
it would be more clear for someone to help, if you could specify your intentions and the jar type.

If you need to browse through the files inside the jar. Use any application that can open zip files.
If you are sure it is an executable jar, you may have associated it to an incorrect application.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!