File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

to include MANIFEST.MF in jar file is allowed?

 
Steve Taiwan
Ranch Hand
Posts: 166
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
peter wooster
Ranch Hand
Posts: 1033
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 166
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much, Petter
Your solution works.
 
peter wooster
Ranch Hand
Posts: 1033
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic