I have been experimenting a little with writing a mobile application in Java. Most of the basics seem fairly easy, given my background in VB.Net and C#. Other things, however, are baffling, or just plain frustrating.
The version of Java I am using doesn’t support emumerated types, so I am using a nice little class I found on the web to emulate them. In my code there is a class like this:
class GxHorizontalAlignment extends UtilEnum { private GxHorizontalAlignment(String name) {super( name, GxHorizontalAlignment.class ); } public static GxHorizontalAlignment Left = new GxHorizontalAlignment("Left"); public static GxHorizontalAlignment Center = new GxHorizontalAlignment("Center"); public static GxHorizontalAlignment Right = new GxHorizontalAlignment("Right"); }
I have been battling for a few days with an error in an error in”GxHorizontalAlignment.class” which reads:
class file for java.lang.NoClassDefFoundError not found super( name, GxHorizontalAlignment.class ); ^1 error
Switching from CLDC-1.0 to CLDC-1.1 makes the error go away.
SDN Bug ID 4313429 seems to explain things somewhat. However, without a proper work-around I will either be forced to target only CLDC 1.1 devices, or abandon this method of simulating enums.
I now have a work-around for the issue I described here […]
Hi,
I found this error when Ive try to install a java game on my pocketpc, do you know how to fix it for this type of device?
Thank you
jocuri:
I am sorry, I have no idea. My guess is that the game is simply incompatible with the version of Java that you have installed on your device. Perhaps you could contact the game’s vendor for help?
Thanks for the blog post. I just looked up for the error string and got to this link..
Cheers
I need a virus scaner