[J2ME] Why am I not seeing anything!?

Started by
2 comments, last by _nomad_ 18 years, 9 months ago
I have a VERY strange problem and I dont know how 2 debug such thing. Oke when I launch the game from Eclipse the app works perfect, but when I launch it from the .jad file then the screen goes blank(white) after the logo. Why does Eclipse do that the .jad doesnt?
Advertisement
It could be that running from the workspace the resources are taken from a certain lib but when bundled in the jar they are placed in the wrong place. Check any image loading code to see it's not throwing any exceptions.

In cases like this, in general, it is good to put:
try {  // ....}catch (Exception e) {  e.printStackTrace();}

around any entry point in your program. These "entry points" are the methods called by the system thread, for instance startApp(), keyPressed(), commandAction(), paint(), etc.

shmoove

EDIT: Added the "not so obvious but quite likely to cause problems" paint() method to the list of entry points.

[Edited by - shmoove on June 30, 2005 11:02:04 AM]
A strange thing happend yesterday. The problem dissapeared without a trace. I didnt do anything during the weekend. Yesterday I started my pc and run Eclipse, did a jar-package rebuild and it worked as if nothing had happened :S
Maybe it was a bug in the jar-package plugin or maybe a bug in the emulator. Anyway the problem is gone.... for now.
I'm not sure with eclipse...but this could be a nice tip for you...

I use netbeans IDE (plus its mobility pack) in developing (using it as my IDE and I compile and run the jar file in the IDE). I then transfer my final project files to the j2me wireless toolkit's /apps directory and then compile it separately in WTK. The resulting obfuscated jar size is always smaller. :)

This topic is closed to new replies.

Advertisement