Results 1 to 13 of 13
  1. #1
    yogi1410 is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default Running Executable jar

    Hi

    I have a executable jar which should open on double click with a UI interface.

    I installed JRE on my VM machine tried the same, but it doesn't open on double click.

    I tried to execute the file using command java - jar --path-to -jar file
    This works fine.

    I would require the jar to open on double click...

    Help needed

    Thanks in advance...

    Regards

    Yogi

  2. #2
    programmer_007's Avatar
    programmer_007 is offline Senior Member
    Join Date
    Aug 2009
    Posts
    125
    Rep Power
    0

    Default

    do you get any error msgs when u double click on jar..

  3. #3
    yogi1410 is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default

    I didn't get any error.
    But nothing happen when i double click...
    Can this be because of VM machine?

  4. #4
    programmer_007's Avatar
    programmer_007 is offline Senior Member
    Join Date
    Aug 2009
    Posts
    125
    Rep Power
    0

    Default

    if ur jar runs good with command lin.. nothing can be wrong with VM . i guess..
    it may be a case that ur code only deals with console's input output only ..

  5. #5
    programmer_007's Avatar
    programmer_007 is offline Senior Member
    Join Date
    Aug 2009
    Posts
    125
    Rep Power
    0

    Default

    what i mean is .. if u add some frames.. or GUI things or something to display... it will work..

  6. #6
    yogi1410 is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default

    I tried opening it on my physical machine it open with
    the ui(SWING).
    But not working on my test VM machine.

    Have checked the env variable setting.

  7. #7
    yogi1410 is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default

    Attached is the zip executable jar file.
    Attached Files Attached Files

  8. #8
    programmer_007's Avatar
    programmer_007 is offline Senior Member
    Join Date
    Aug 2009
    Posts
    125
    Rep Power
    0

    Default

    she executes with me ..LoL..

  9. #9
    Fondor is offline Member
    Join Date
    Apr 2010
    Posts
    10
    Rep Power
    0

    Default Compiler

    What compiler (and editor) are you using? Eclipse?

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default

    What system are you on?
    What's the VM?

    Assuming it some windowy vm, what does a right click on the jar and peeking at the properites show? Does it say to open with Java?

  11. #11
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    5

    Default

    your jar runs fine. i start your gui with a double click or from the command line with "java -jar RegEx.jar".
    Last edited by j2me64; 04-15-2010 at 01:52 PM.

  12. #12
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    Assuming you are running windows, when you double click a jar file in windows, it doesn't run 'java', it runs 'javaw'. Depending on how you installed your jre, these might not be compatible versions.

  13. #13
    Serrano0811 is offline Member
    Join Date
    Apr 2010
    Posts
    2
    Rep Power
    0

    Default

    Hi, it sounds like environment variables problem to me.

    I run your jar too by doble cliking on it.

    Remember that you should create a JAVA_HOME(4 dev use)
    and add the BIN route in the path variable to let the sistem recognize
    any java command from anywhere.

    Also, you should check if you have the files in the BIN,
    like java.exe, javaw.exe.... etc

Similar Threads

  1. Need help for creating executable xml
    By patilsubh in forum XML
    Replies: 3
    Last Post: 10-01-2009, 10:54 AM
  2. Replies: 0
    Last Post: 08-26-2009, 01:03 PM
  3. executable
    By smooth in forum New To Java
    Replies: 4
    Last Post: 06-14-2008, 05:12 PM
  4. Executable Java
    By eva in forum New To Java
    Replies: 3
    Last Post: 12-30-2007, 11:38 PM
  5. Executable JAR
    By bugger in forum New To Java
    Replies: 4
    Last Post: 12-05-2007, 05:41 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
  •