4/21/13

Creating a jar File in Command Prompt


Creating a jar File in Command Prompt

This one is the way to make your java program become executable as jar file.

Start Command Prompt.
  1. Navigate to the folder that holds your class files:
    C:\>cd \mywork
    
    
  2. Set path to include JDK’s bin.  For example:
    C:\mywork> path c:\Program Files\Java\jdk1.5.0_09\bin;%path%
    
    
  3. Compile your class(es):
    C:\mywork> javac *.java