Results 1 to 3 of 3
Thread: problem with output of jar file
- 07-04-2009, 10:31 AM #1Member
- Join Date
- Jul 2009
- Rep Power
problem with output of jar file
I have written a simple program that displays Hello. Then I have created its jar file using the following command:
jar -efc Hello Hello.jar Hello.class
The jar file runs well in the command prompt by using the following command:
java -jar Hello.jar
But when I double click the jar file, nothing happens. No output is displayed. How can I make the jar file run simply by double clicking it?
- 07-04-2009, 04:47 PM #2
Your system must be configured to execute jar files like this. If on Windows, a file association is required. Try reinstalling Java and it should be set up automatically.
If this is just a console application, it is likely that the command window appears and disappears before you can see it, as the program is so short.Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 07-04-2009, 05:00 PM #3
When your problem is solved, please mark it as SOLVED using the threads's tools below the google ads.USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- By shiva in forum Java ServletReplies: 0Last Post: 04-24-2009, 03:06 PM
- By sfe23 in forum New To JavaReplies: 4Last Post: 03-26-2009, 11:44 PM
- By SwapnaNaidu in forum New To JavaReplies: 7Last Post: 11-19-2008, 03:09 PM
- By jazz2k8 in forum New To JavaReplies: 4Last Post: 05-26-2008, 11:59 AM
- By jvasilj1 in forum New To JavaReplies: 0Last Post: 01-31-2008, 07:39 PM