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

Thread: Double Clicking JAR files

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    182
    My Mood
    Where
    Thanks
    15
    Thanked 8 Times in 8 Posts

    Default Double Clicking JAR files

    I am confused... up until now, I have always either compiled jars into .exe using JSmooth or run jars from a batch file.

    However, I have read in several places that JAR files are supposed to be double-clickable? On my system, it just pops up with a command line and immediately goes away. Does anyone here know how (and if) you can make a jar file launch just from a click?

    I am running 64 bit Windows Vista with JRE 1.6_026


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Double Clicking JAR files

    how (and if) you can make a jar file launch just from a click?
    On windows there are entries in the Registry that tell the OS what to do when a file with an extension is double clicked/openned. Many of the entries are command lines that the OS will execute when the file is double clicked.

    The java installation adds an entry for .jar files. Something like this:
    java -jar "%1"

    where %1 is replaced by the jar file name.

    It is possible to add your own command lines to the registry so that when you Right Click on a file, you get a list of choices of commandlines to execute.

    I have double click set on for my WinXP. I don't know if you can set the OS to execute a file with a single click. If an icon is placed in the Toolbar at the bottom of the screen, a single click will execute it.

Similar Threads

  1. Seraching through files in a folder for a pattern match inside the files.
    By dazzabiggs in forum What's Wrong With My Code?
    Replies: 4
    Last Post: May 2nd, 2011, 08:35 AM
  2. Replies: 1
    Last Post: March 22nd, 2011, 06:59 PM
  3. Replies: 10
    Last Post: November 16th, 2010, 12:12 AM
  4. java is not clicking for me, why?
    By cejay in forum Java Theory & Questions
    Replies: 1
    Last Post: February 28th, 2010, 12:57 PM
  5. How to upload a file by clicking a link instead of button?
    By raghuprasad in forum Java Theory & Questions
    Replies: 2
    Last Post: May 3rd, 2009, 05:21 AM