aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Need help RE: adding manifest file to JAR file 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 "Need help RE: adding manifest file to JAR file" Watch "Need help RE: adding manifest file to JAR file" New topic
Author

Need help RE: adding manifest file to JAR file

Rob Zidsen
Greenhorn

Joined: Jul 07, 2003
Posts: 16
I don't know why, but I can't get my version of the manifest file into the jar file I create. I know I'm putting in the right command, but when I check the manifest file in the JAR archive, it's just the default one supplied by sun.
Is there a way to extract that one and insert my one manifest file?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11424
    
  85

Hi Rob,
Care to post your command line?
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Rob to give you an idea, here is my server jar command that adds my manifest file to it.

as you can see I have my manifest file located in the c:\devexam\manifest\server directory. The "-cvfm" shows that the 'm' means that you are going to tell where the manifest file is.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
amir eshaq
Greenhorn

Joined: Jul 31, 2003
Posts: 1
Rob,
I had the same problem simply because I did not include a new line after the last entry in the manifest file.
e.g. content in the manifest.mf file
Manifest-Version: 1.0
Main-Class: package.classname
<-- make sure you have a new line here...
... otherwise the Main-Class will not be included in the created manifest file in the jar file.
jamalag
 
 
subject: Need help RE: adding manifest file to JAR file