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.
- Navigate to the folder that holds your class files:
C:\>cd \mywork
- Set path to include JDK’s bin. For example:
C:\mywork> path c:\Program Files\Java\jdk1.5.0_09\bin;%path%
- Compile your class(es):
C:\mywork> javac *.java
- Create a manifest file:
C:\mywork> echo Main-Class: DanceStudio >manifest.txt
- Create a jar file:
C:\mywork> jar cvfm DanceStudio.jar manifest.txt *.class
- Test your jar:
C:\mywork> DanceStudio.jar
http://www.skylit.com/javamethods/faqs/createjar.html
No comments:
Post a Comment