Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2009, 10:31 AM
Member
 
Join Date: Jul 2009
Posts: 10
Rep Power: 0
nishant.4545 is on a distinguished road
Default problem with output of jar file
Hello everyone
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?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 07-04-2009, 04:47 PM
OrangeDog's Avatar
Senior Member
 
Join Date: Jan 2009
Location: Cambridge, UK
Posts: 838
Rep Power: 2
OrangeDog is on a distinguished road
Default
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
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2009, 05:00 PM
angryboy's Avatar
Senior Member
 
Join Date: Jan 2009
Location: Javaland
Posts: 743
Rep Power: 2
angryboy is on a distinguished road
Default
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)
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No output to file shiva Java Servlet 0 04-24-2009 03:06 PM
Output to a text file sfe23 New To Java 4 03-26-2009 11:44 PM
Search a word(taken from one file) in another file and give the line as the output SwapnaNaidu New To Java 7 11-19-2008 03:09 PM
Output Problem jazz2k8 New To Java 4 05-26-2008 11:59 AM
Output problem jvasilj1 New To Java 0 01-31-2008 07:39 PM


All times are GMT +2. The time now is 07:03 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org