Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Beans" Watch "Beans" New topic



Joined: Jan 31, 2002
Posts: 4
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

Joined: Jan 27, 2003
Posts: 76
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.

Thanks,<p>Vijay<p>The Hand that gives, Gathers.
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
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...
[ January 28, 2003: Message edited by: Simon Brown ]
I agree. Here's the link:
subject: Beans
It's not a secret anymore!