Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Executable jar

 
Mathew Sam
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is an executable jar file created
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need a class with a main() method, and a manifest file that says which class in the jar it is.
If your class is named this.that.Bootstrap, your manifest will look something like this:
Main-Class: this/that/Bootstrap
then jar the class file together with the manifest. For the manifest to be read in properly, you need to mark it specially:

where the 'm' flag introduces the manifest.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Mathew Sam
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael
i appreciate your patience to reply our queries
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!