| Author |
How to create Jar file[Greenhorn]
|
Kris Danielewski
Greenhorn
Joined: Apr 01, 2009
Posts: 25
|
|
I have seen few examples online but i can;t make my own jar file...
I aslo searched forum , however found only more advanced related topics...
Could someone please write to me step by step how to do it?
My class name Game.java (contains main)
thanks...
|
 |
John de Michele
Rancher
Joined: Mar 09, 2009
Posts: 600
|
|
Kris:
Try this page.
John
|
 |
K. Tsang
Ranch Hand
Joined: Sep 13, 2007
Posts: 1222
|
|
Hi Kris, you should check out the help for the jar command "jar -help"
Simple example: "java cvfm <filename>.jar manifest.txt -C classes ." or "jar cvfe <filename>.jar <main class with full package> -C classes ."
classes is the directory containing all .class files. The period "." represents everything in that directory. The manifest file contains what the main class, classpath if any etc
Sample manifest:
|
K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8439
|
|
@Kris
http://faq.javaranch.com/java/UseAMeaningfulSubjectLine
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
 |
|
|
subject: How to create Jar file[Greenhorn]
|
|
|