Change the Maniest File R no Dinner

Hay all,

Hope u all are fine...But iam not , this trouble is killing me :-( .

Actually i wanna run a jar file using

java -jar example.jar

Well u may say that i should modify the MANIFEST.MF fiel accordingly..Cool

I wrote aex.MF of my own like the one that follows

Main-Class: Test (say this is the class whis has the main method)

and at the command prompt i did

jar cvmf example.jar ex.MF Test.class

There are no packages involeved it jus a plain class

But the above command gives errors ;-( like

java.io.IOException: invalid header field

at java.util.jar.Attributes.read(Attributes.java:383)

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:124)

at sun.tools.jar.Main.main(Main.java:904)

Get me out of this trouble plss else i cant have my dinner....................:-(

[993 byte] By [ganeshramhere] at [2007-9-30 19:23:22]
# 1

if

"Main-Class: Test (say this is the class whis has the main method)"

is the only line in your MF file, then here is the solution.

try this:

Manifest-Version: 1.0

Main-Class: Test (say this is the class whis has the main method)

Class-Path:

Name: TEST/ClassFile

for more refer:

http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html

kapilChhabra

kapilChhabra at 2007-7-6 23:36:41 > top of Java-index,Administration Tools,Sun Connection...