0

I created a jar file using cmd prompt.

when i run it using : jar cvfm <filename>.jar manifest.txt *.class

gives the error:

java.io.IOException : invalid header field....

Please help me to solve this...

2
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by jrosh
Featured Replies
0

That is how you create a jarfile, not how you "run it". Now, in which step are you having problems. When creating it, or when executing it?

0

OK ..how can I run it then??

please refer to my other post too....

Thankx in advance.....

0

clicking jar file says :
Could not find the main class (note : I created the manifest file)

clicking bat file says:
unsupportedClassVersionError: bad version number in .class file

:( Sory to bothr so much!!!

0

clicking jar file says :
Could not find the main class (note : I created the manifest file)

Then you either did not configure the manifest file properly, or you did not include the main class in your jarfile.

clicking bat file says:
unsupportedClassVersionError: bad version number in .class file

:( Sory to bothr so much!!!

Then, as stated before, you are not using the correct version of java for either your compiling and/or executing.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.