aspose file tools*
The moose likes Beginning Java and the fly likes a question about executable jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "a question about executable jar files" Watch "a question about executable jar files" New topic
Author

a question about executable jar files

Annalisa Annalisa
Greenhorn

Joined: Mar 07, 2005
Posts: 6
Hello everybody,
I've generated my jar file following the suggestions of a thread of yours. I think I've generated it correctly because if I run the command
java -jar Myjar.jar from the Windows command line, my dialog starts correctly. But it doesn't when double-clicked. The Windows dialog asking which application I want to use to pen the file appears and I don't know what to choose. Sorry if the answer is obvious but I really don't know it .
:roll:

Thank you everybody,
Annalisa
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
do u have winzip or winrar... use it to open the jar


Thnx
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
Check this thread.
Annalisa Annalisa
Greenhorn

Joined: Mar 07, 2005
Posts: 6
Thank you but I still have problems. Of course I don't have to simply list the content of the file but I have to launch the application. And I can't do it. I followed the steps I've read in the thread suggested, but I get the following error:
Annalisa Annalisa
Greenhorn

Joined: Mar 07, 2005
Posts: 6
'Couldn't find the main class. Program will exit.'

(sorry for the division in 2 posts)
Annalisa Annalisa
Greenhorn

Joined: Mar 07, 2005
Posts: 6
I finally solved my problem with an 'escamotage': I've written a .bat file that launches my application from command-line but it works like a double-clicked executable..
thank you all

Annalisa
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a question about executable jar files