Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: JAR-files doesn't seems to run

  1. #1
    Member
    Join Date
    Apr 2013
    Posts
    43
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default JAR-files doesn't seems to run

    Hello!

    I have an annoying problem with JAR-files. I can run the JAR-files from the cmd, but when I double click the JAR-file, nothing seems to happen. I have a program that create two files, and the files are created when I double-click the Jar-file, so my conclusion is that the file is actually running, but I can't see anything. I have JAR-files that consist of classes using Swing, and they do run as expected.


    What's wrong and what should I do?

    Hank


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,812
    My Mood
    Mellow
    Thanks
    177
    Thanked 626 Times in 613 Posts

    Default Re: JAR-files doesn't seems to run

    If there is evidence that the program has run - the two files are created - what else should you see? It sounds like you're talking about 2 different programs, one that does present a Swing UI and another (this one) that doesn't. While the Swing app works fine, this one creates the two files, stays hidden, and apparently exits. What else should be happening with this non-Swing app? Are you expecting a CMD window to open?

  3. #3
    Member
    Join Date
    Apr 2013
    Posts
    43
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default Re: JAR-files doesn't seems to run

    Yes, I'm expecting a CMD window to open. I have a few "System.out.println" - streams that I want to see.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,812
    My Mood
    Mellow
    Thanks
    177
    Thanked 626 Times in 613 Posts

    Default Re: JAR-files doesn't seems to run

    Ahh. Try this Stackoverflow response to a similar question. If this doesn't do it for you, try searching for others.

  5. The Following User Says Thank You to GregBrannon For This Useful Post:

    iHank (January 29th, 2014)

  6. #5
    Member
    Join Date
    Apr 2013
    Posts
    43
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default Re: JAR-files doesn't seems to run

    Thank you, man. It is working now.

    Hank

  7. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,812
    My Mood
    Mellow
    Thanks
    177
    Thanked 626 Times in 613 Posts

    Default Re: JAR-files doesn't seems to run

    Glad you got it working.

Similar Threads

  1. JEditorPane doesn't load html file when jar executable run
    By dancaer69 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: November 12th, 2013, 09:46 AM
  2. This Program doesn't run completely, what do I need to fix? Please Help
    By shafat in forum What's Wrong With My Code?
    Replies: 8
    Last Post: August 6th, 2013, 09:04 AM
  3. Compiled .jar won't run when using .wav-files.
    By EatMyBible in forum AWT / Java Swing
    Replies: 6
    Last Post: May 22nd, 2013, 06:23 PM
  4. [SOLVED] files size for files inside the JAR file
    By Natherul in forum Java Theory & Questions
    Replies: 3
    Last Post: February 9th, 2012, 02:17 PM
  5. How to create or edit .ser files in Jar files
    By xbill in forum Java IDEs
    Replies: 1
    Last Post: May 18th, 2011, 05:15 AM