Results 1 to 5 of 5
Thread: .jar help
- 11-25-2011, 08:34 AM #1
Member
- Join Date
- Nov 2011
- Posts
- 4
- Rep Power
- 0
.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!
- 11-25-2011, 12:57 PM #2
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 - Play indie games, learn from game tutorials and source code, upload your own games!
- 11-25-2011, 01:06 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
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.
- 11-26-2011, 02:04 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
Re: .jar help
The story continues at .jar Help. Reply there, not here.
-
Re: .jar help
Locked as a duplicate thread.


LinkBack URL
About LinkBacks

Bookmarks