Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar files

 
RAHUL
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
should a jar file include a main class name in it manifest file.
and whether jar file can execute without this
 
Petrus Pelser
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not need to supply the main class' name in the manifest, but then you will not be able to execute it, unless you supply the fully qualified name with the jar in your classpath.

Most of the packages are packaged in this way - i.e. try and execute javaee.jar ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic