• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beans

 
Ambreen
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i write
jar -cvfm a.jar MANIFEST.MF MyFrame.class
it does not add the manifest file. This should not happen cauze this is a valid command
is there any other way around
 
Vijayakumar Arya
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do you verified that the jar file does not contain your the manifest file.
FYI, whatever may be the manifest file the contents are taken and validated whether they adhere to the Jar Manifest file specification and once it is valid the contents are added to the file MANIFEST.MF in the META-INF directory.
If you view the files MANIFEST.MF it should contain the contents of the manifest file you added at the time of archiving.
I tested the same and it is working fine.
The jar utility especially the manifest file creator first sees that whether the specified manifest file exists - (if it doesn't then throws an exception) and verifies that the manifest file is valid (if it does not follow the manifest file specification throws an exception).
A valid manifest header will be added to the file if it does not have one.
I am able to successfully add my own manifest file into the jar archive. Please give more info on your problem, any specific reason to have your own manifest file.
Refer the tool documentation section in the JDK documentation for more details.
----------------
Vijay.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ambreen",
Thanks for joining JavaRanch, but could you just take a quick look at the naming policy and edit your profile.
Moving this to the JIG forum...
Thanks
Simon
[ January 28, 2003: Message edited by: Simon Brown ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic