[Pljava-dev] NoClassDefFoundError?

Markus Schaber schabi at logix-tt.com
Tue Apr 15 09:06:55 UTC 2008


Hi, Manuel,

"Manuel" <manueldao at hotmail.com> wrote:

> test1.jar looks like this on the inside:
> 
>   a..    com/example/Main.class (includes "import com.example.TestClass")
>   b..   test2.jar
> 
> test2.jar looks this on the inside:
>   a..    com/example/TestClass
> 
> Any ideas as to why that may be happening?  

You cannot simply include one jar in another, the classloader won't
figure this out.

Either you merge the 2 jar files into a single one, or add the second
jar file to your classpath separately, or use your own classloader.

See http://www-128.ibm.com/developerworks/java/library/j-onejar/ for a
poor guy who had to solve the same problem some time ago.


Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org



More information about the Pljava-dev mailing list