Thursday 18 September 2014

How to create jar file using Command Prompt

How to create jar file using Command Prompt

1.Collect all file like hello.class inside any folder
2.Go to that folder
3.Type in cmd-E:\JARFile>set path=C:\Program Files\Java\jdk1.7.0_51\bin
4.Press Enter
5.Provide the file name on which you want to make a jar file
E:\JARFile>jar cf hello.jar hello.class

Ouput- You get the hello.jar file in your current folder, double click on this and use it

No comments:

Post a Comment