Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Modifying manifest in jar files.

807598Oct 22 2006 — edited Oct 22 2006
I occasionally write java applications and deploy them as executable jar files, modifying the manifest to include the Main-Class attribute I use a text editor, no Ides'.
I had no difficulties with jdk 1.4.2 installed on Windows 2000. With jdk1.5.0_06 installed on Windows XP the jar file is being created with the jar cvf command.But when I try to add the manifest with the jar cmf Manifest-addition jarfile classfiles command what I am getting is an error:
"java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:393)
at java.util.jar.Manifest.read(Manifest.java:167)
at java.util.jar.Manifest<init>(Manifest.java:52)
at sun.tools.jar.Main.run(Main.java:123)
at sun.tools.jar.Main.main(Main.java:903)"
I am careful to end the Manifest-addition text filewith a newline character .
I could not find any reference to this in the bugs databaseI shall be grateful if someone can tell me what I'm doing wrong.Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2006
Added on Oct 22 2006
7 comments
1,284 views