Results 1 to 3 of 3
  1. #1
    nishant.4545 is offline Member
    Join Date
    Jul 2009
    Rep Power

    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?

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Cambridge, UK
    Rep Power


    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

  3. #3
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Rep Power


    When your problem is solved, please mark it as SOLVED using the threads's tools below the google ads.
    Get NotePad++ (free)

Similar Threads

  1. No output to file
    By shiva in forum Java Servlet
    Replies: 0
    Last Post: 04-24-2009, 02:06 PM
  2. Output to a text file
    By sfe23 in forum New To Java
    Replies: 4
    Last Post: 03-26-2009, 11:44 PM
  3. Replies: 7
    Last Post: 11-19-2008, 03:09 PM
  4. Output Problem
    By jazz2k8 in forum New To Java
    Replies: 4
    Last Post: 05-26-2008, 10:59 AM
  5. Output problem
    By jvasilj1 in forum New To Java
    Replies: 0
    Last Post: 01-31-2008, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts