NoClassDefFoundError with Executable Jar?

You do not have to pack your additional jars into your jar. These jars should be in the same directory as your application jar. By other words: put all jars into one directory and run.

Everything will work.

You do not have to pack your additional jars into your jar. These jars should be in the same directory as your application jar. By other words: put all jars into one directory and run.

Everything will work. Reasons: think what does executable jar mean. If you jar is not "executable" you run it as following: java -cp art.

Jar;ldom. Jar;other. Jar uk.co.

Art when your jar is executable you use the following command line: java -jar art. Jar No magic: jvm opens manifest and takes name of main class and other jars from there and virtually creates command line like first one. Now you understand that all jars in your case must be in the same directory.

Excellent... I thought so, I might be making some silly mistake. Thanks a lot. This does solve the problem and my program runs with success.

– Swift-Tuttle Dec 23 '10 at 14:54.

You cannot bundle other JAR's in a JAR. They have to go in the same folder or at least in a folder relative to the Arc.jar. You specify then its relative path in the Class-Path entry.

Eclipse however has an useful export tool which allows you to embed the contents of other JAR's in your JAR so that you don't end up with multiple loose JAR's which are required to be placed in a specific location. Check the 2nd Library Handling option when you choose Export > Runnable JAR file. When choosing Package required libraries into generated JAR, then Eclipse will add a special classloader which will load those JAR's transparently for you before executing the main class.It's doing that with help of JarRsrcLoader.

Maybe the . Jar is corrupt, like sometimes happened to me. Take a look at this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions