Results 1 to 5 of 5

Thread: .jar help

  1. #1
    guitardenver is offline Member
    Join Date
    Nov 2011
    Rep Power

    Default .jar help

    So i've wrote many programs in java but never ran them outside the IDE. I have read a lot about creating .jar files. I wrote a simple and famous Hello World Class the just shows a JOption message pane that says Hello World. I use Eclipse with Windows 7. I exported the project in Eclipse to a JAR file. I go to the command line and do java -jar HelloWorld.jar and it runs my program just fine. This is not what I need to do. I want to be able to just double click on it and have it work. ON ANY COMPUTER I PUT IT ON. So I created a batch file that does the Command line stuff for me. I put the .jar file and my .bat file on a flash drive and put it on another computer (Windows 7 also with java 1.6) and I put the .jar file in the same directory my .bat file says it will be and the program DOES NOT RUN! WHY!!! Do I need to include another folder in the same directory as the .jar?? What do I need to do to make an executable thats portable??? And user friendly. People dont want to type CMD lines. Double Click and done. Thanks for the help!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power

    Default Re: .jar help

    Do you get any warning messages or anything? And can't your (non-linux) users just double click the jar to run it? Have you looked into webstart at all?
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: .jar help

    Make an executable jar by sticking a proper Manifest file into the jar.
    That way the user can double click the jar and it should run.

    That should give you enough buzzwords to Google on.

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: .jar help

    The story continues at Reply there, not here.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Posting Permissions

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