Creating an executable jar file(Pls. Reply)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, September 3, 2003 08:25 PM


I have written a program using Netbeans to be run by a person who does not know java. I need to convert the program into something that person can just clik on and use it (similar to an exe file). How do I do it. Thank you very much.

Re: Creating an executable jar file(Pls. Reply)

Posted By:   Stephen_McConnell  
Posted On:   Thursday, September 4, 2003 05:27 AM

You need to indicate in the Manifest file of the Jar what your Main class is (that class must have a "main(String [] args)" method.


You first create your jar file like normal....


Then follow the instructions in the
Modifying the Manifest File tutorial. The following tutorial section JAR Files as Applications - 1.2 platform only tells you what modifications need to be made to the manifest to do this.


However, if you are using "Eclipse" or "JBuilder" or another IDE, they usually have a feature for creating an executable jar file that will execute when clicked (or you can create a desktop shortcut and click that --- works on Linux KDE and Gnome and Windoz).


Stephen McConnell

About | Sitemap | Contact