easywayprogramming.com how to create jar file of application in java
Step 1:- Copy all the class files & file & folders required for application in folder
Step 1:- Copy all the class files & file & folders required for application in folder
Step 2:- Setting environmental variable
Open command prompt. Go to folder where your application exists.
Set environmental variable by executing following command
set path="c:/program files/ java/ jdk 1.5/ bin";
where path string is path of jdk/bin installed in your PC
Step 3:- Creating a jar file:
Execute following command at command prompt.
jar cvf application_name.jar *.*
press enter. Your jar file is created.
Step 4:- Now open that jar file with winrar.
Open
manifest.mf file in notepad. manifest.mf file exists in folder META-INF
folder. Write following line in last of file
Main-Class:
Name of first opening frame main class file of your application without
.class extension without extension, for example password screen.
Example, Main-Class: password_screen
save changes to file.
Double click on jar file. See what happens.