December 5, 2009

 

J2ME: Workaround for "Class NoClassDefFoundError not found"

When you compile for CDLC 1.0 if you use SomeClass.class, you could get this error: "class file for java.lang.NoClassDefFoundError not found".
There're two ways of workaround: compile for CLDC 1.1 or use this style:
Class class = Class.forName("package.SomeClass");
instead of:
Class class = package.SomeClass.class;, although it has the right syntax.

Labels: , , ,

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?