aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Add Manifest to Jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Add Manifest to Jar" Watch "Add Manifest to Jar" New topic
Author

Add Manifest to Jar

Qusay Jaafar
Ranch Hand

Joined: May 06, 2002
Posts: 127
Hi,
I tried to add a Manifest.MF file to jar. Manifest.MF contains the following:
Manifest-Version: 1.0
Main-Class: com.gui.MyMainFile
I put Manifest.MF in C:/MyDir/(I put it and creating jar file, here)
/classes
/com
/gui/MyMainFile
to create jar file, I used:
jar -cfm MyJar.jar Manifest.MF -C classes .
what happen, MyJar.jar always uses its default Manifest.MF
Please, what's wrong here???
Regards


Qusay
Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Hi Quasy,
have you checked whether your manifest file conforms to the specification? (Is there a line feed/carriage return in the last line?)
Hope this helps.


Mag
Qusay Jaafar
Ranch Hand

Joined: May 06, 2002
Posts: 127
Hi,
pressing Enter key at the end of the line Main-Class:..... and it will be everything is fine.
thank you for your reply.
Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add Manifest to Jar
 
Similar Threads
Manifest.MF is not generate correctly
Unable to create jar with specified manifest.mf
NoClassDefFoundError when using jar
Reading a EAR file
jar files