View Single Post
  #4 (permalink)  
Old 04-04-2008, 09:49 PM
new_2_java new_2_java is offline
Member
 
Join Date: Feb 2008
Posts: 45
new_2_java is on a distinguished road
Here's what you need to do:

1. You should have a Manifest.mf file, which will contain the following lines.

I am using HelloWorld.java as example.

Code:
Main-Class: your.package.HelloWorld
NOTE: Make sure you hit ENTER at the end of the line (Manifest.mf file).

2. Next create your jar file, as follow:
Code:
>jar cmf Manifest.mf hello.jar *.*
That's it. You can run it by double clicking on it and or as follow:

Code:
>java -jar hello.jar

Last edited by new_2_java : 04-04-2008 at 09:53 PM.
Reply With Quote