GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes to include MANIFEST.MF in jar file is allowed? 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 "to include MANIFEST.MF in jar file is allowed?" Watch "to include MANIFEST.MF in jar file is allowed?" New topic
Author

to include MANIFEST.MF in jar file is allowed?

Steve Taiwan
Ranch Hand

Joined: Jul 01, 2003
Posts: 166
I am ready to submit my assignment and am preparing my jar file.
However, when using jar command line to create a jar file, the MANIFEST.MF must be automatically created and attached with the jar file. Is this allowed by SUN? Can I use zip file??
Thank you if replying to me.


Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Steve Taiwan:
I am ready to submit my assignment and am preparing my jar file.
However, when using jar command line to create a jar file, the MANIFEST.MF must be automatically created and attached with the jar file. Is this allowed by SUN? Can I use zip file??
Thank you if replying to me.


Since the instructions say "your submission must be packaged in a JAR file", and a Jar file is defined by Sun to be a Zip file with a manifest, I suspect the manifest is alright, maybe even required. Note that the assignment itself came in a Jar file with a default manifest.

If you want to build a Jar file without a manifest the M flag will allow you to do that. eg.

would put all the files and directories in distribution into jar file submission.jar without a manifest.
Steve Taiwan
Ranch Hand

Joined: Jul 01, 2003
Posts: 166
thank you very much, Petter
Your solution works.
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Steve Taiwan:
thank you very much, Petter
Your solution works.


You're welcome, but the original question still remains unanswered. Does it matter if there is a Manifest in the submission jar file?
 
GeeCON Prague 2014
 
subject: to include MANIFEST.MF in jar file is allowed?