Thursday, June 5, 2008

modifying a manifest file for java jar files

The default manifest file simply contains the two lines
Manifest-Version: 1.0
Created-By: 1.6.0 (Sun Microsystems Inc.

(The content of a manifest file is in header: value pairs with a newline separating each one)
So you could add the following
Main-Class: yourmainclass.class
to your file manifest.txt and then

jar cfm myjar.jar manifest.txt

No comments: