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