This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create Jar file[Greenhorn]

 
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: 3354
12
Android Java
  • 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:
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic