Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help update MANIFEST.MF when creating a jar

6 views
Skip to first unread message

Marie Henricsson

unread,
Apr 14, 2001, 3:16:46 PM4/14/01
to
Hi!

I want to create a jar file with a main-class.
(all files are in the same directory no packages, I use Java SDK 1.3)
I've made a textfile called manif.mft with only one line (to update the
Manifest.MF):
Main-Class: gui

I tried to create the jarfile with the command:
jar cfm manif.mft testa.jar gui.class kor.class LonePost.class
LoneBiPost.class LoneBiPostSum.class Postgam.class SkapaLon.class
SkapaLonebi2.class SkapaLonebibokning.class SkapaSlutPost.class
Textgam.class TotTxt.class TotTxt2.class

I got the following error message:

java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:354)
at java.util.jar.Manifest.read(Manifest.java:161)
at java.util.jar.Manifest.<init>(Manifest.java:56)
at sun.tools.jar.Main.run(Main.java:125)
at sun.tools.jar.Main.main(Main.java:904)

I also tried to put the line: Manifest-Version: 1.0, in the manif.mft file
but the same error occured.

I have no problem to create a jar without using the manif.mtf file.

Can someone please help me with what information I need to include in the
manif.mtf file for this to work?

Thanks,
Marie

Marie Henricsson

unread,
Apr 15, 2001, 5:25:33 AM4/15/01
to
Hi!
Now it works.
Thanks
/Marie
"Marie Henricsson" <Blood...@everyday.com> wrote in message
news:ym1C6.2558$Qp1....@nntp1.chello.se...
0 new messages