Bookmark Topic Watch Topic
  • New Topic

Java

 
Lavanya Balaraman
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Report post to moderator
How to create a jar file in java please any body help me

Thank you

 
Swastik Dey
Rancher
Posts: 1604
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Report post to moderator
//if not any executable jar i.e does not have any manifest
jar -cfM jarfilename.jar yourclassfilename.class

//if an executable jar i.e. has a manifest file too

-jar -cfm jarfilename.jar manifestfilename.mft yourclassfilename.class
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
In the future, please UseAMeaningfulSubjectLine. The one you chose is particularly unhelpful on this site where all questions deal with Java in one way or another.

You may want to work read the Java Tutorial chapter on jar files: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic