Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Rep Power
    0

    Exclamation Java JAR file execution

    Hi everyone,
    I have never actually worked with JAR files. This is my first time, and I am having trouble. After much trouble, I finally modified the manifest so it runs. On command prompt anyway. As in, using java -jar example.jar works perfectly fine, but when I double click it, nothing happens. Help?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Java JAR file execution

    What operating system and desktop environment are you using? And do other .jar files run when you double click them?

    Generally Windows assumes double click == run the .jar with the javaw.exe executable and sets things up to do that. (Although occasionally people find that they need to set the association - it's been discussed here before.)

    Linux makes no such assumption. Out-of-the-box, my K desktop regards the jar file as an archive (like a zip file) and a double click opens it for editing.

  3. #3
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,095
    Rep Power
    20

    Default Re: Java JAR file execution

    And because windows tends to use the javaw version to run on a double click you won't see a console.
    So if it's a console app then you won't see anything.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 3
    Last Post: 04-15-2012, 01:38 PM
  2. Replies: 6
    Last Post: 11-30-2011, 08:39 PM
  3. Jar file execution error
    By uberketer in forum New To Java
    Replies: 3
    Last Post: 06-06-2011, 12:27 PM
  4. Replies: 10
    Last Post: 11-29-2010, 02:02 PM
  5. Need help in java program execution...
    By sachinmittal in forum New To Java
    Replies: 6
    Last Post: 10-10-2008, 02:37 PM

Tags for this Thread

Posting Permissions

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