File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jar files" Watch "jar files" New topic

jar files


Joined: Nov 08, 2006
Posts: 7
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

Joined: Feb 20, 2006
Posts: 132
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 ...
It is sorta covered in the JavaRanch Style Guide.
subject: jar files
It's not a secret anymore!