Java Micro Edition development – annoying emulator error

After a long time, I recently started playing with the Java Micro Edition again. Many years ago, I had downloaded and installed the Wireless Toolkit from Sun’s website (then in beta), and had hacked together common mobile games – snake, hangman, and the like.

So, when I downloaded the toolkit this time (v2.5 now), it was annoying to find that I couldn’t even seem to run a basic midlet without the emulator barfing at start up time, with an inexplicable ‘Uncaught exception java/lang/ArrayIndexOutOfBoundsException’ – no line numbers, nothing. The emulator screen wouldn’t list the midlet name either, so clicking on the soft button would simply print the same exception message again.

Google was of limited help. More annoying.

Finally, I just played around with different configurations during launching the midlet, and when running it in “class” mode (you have to specify the midlet class), it seems to work.

So there’s a work-around for you.

One thought on “Java Micro Edition development – annoying emulator error

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s