I am trying to create and execute a jar file. the jar file has few depencies. the manifest.mf file is
and when i try to run the jar file with following command
it gives me following error
What mistake am i doing? i am unable to get it working .. any help?
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
Joined: Oct 13, 2005
Have you really got 3 lines in the Manifest? There should be 4, the last line being empty.
I presume you have read the Java Tutorials section, where it says you must end with a line terminator character. Shouldn't you have all those jars in the classpath part of the Manifest file, rather than listing them at the command line?
Joined: May 11, 2006
I have solved the issue. and yeah - it was missing the new line :$ .. thanks
Another problem here is that you have space characters in the classpath. That's why the JVM thought "D:\alerter-jar\commons-codec.jar" was the name of the class you were trying to execute. But since you specify all the jar files in the manifest, there's no need to have a classpath here at all.