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:
instead of:
, although it has the right syntax.
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;
Labels: j2me, java, NoClassDefFound, programming