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 3 of 3

Thread: Making executable JAR more "executable"

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making executable JAR more "executable"

    Hello

    I have written and packed an executable JAR file. When running it in command line using "java -jar" it works fine, but when I double click it (Im on MS Windows 7) nothing happens.

    What should I do to make it executable also by double click ?

    Thanks

    Guy


  2. #2
    Senile Half-Wit Freaky Chris's Avatar
    Join Date
    Mar 2009
    Location
    Wales, Bangor & England, Warwickshire
    Posts
    820
    My Mood
    Cynical
    Thanks
    7
    Thanked 104 Times in 90 Posts

    Default Re: Making executable JAR more "executable"

    What is the nature of the Jar. Jar files when run do not open a commandline. So if you program was to contain Windows it would work fine, such as JFrames etc. However if your Jar file contains all console stuff then you will have to run it from the console and not just double click it.

    Regards,
    Chris
    chris[at]javaprogrammingforums[dot]com

    Prifysgol Bangor University, North Wales

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Making executable JAR more "executable"

    Well, you're right. It is a console application. I am so used to swing applications that I expected it to behave the same...

    Thanks

    Guy

Similar Threads

  1. Replies: 1
    Last Post: March 31st, 2010, 09:42 PM
  2. Replies: 1
    Last Post: March 15th, 2010, 10:03 PM
  3. "java.lang.NoSuchMethodError: main" and "fatal exception occured."
    By joachim89 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 10th, 2010, 07:35 AM
  4. Replies: 1
    Last Post: October 25th, 2009, 11:54 AM
  5. Replies: 4
    Last Post: August 13th, 2009, 05:54 AM