• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create Jar file[Greenhorn]  RSS feed

 
Kris Danielewski
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kris:

Try this page.

John
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!