Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

recompiling to sony ericsson

 
lars pellarin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

This is my first post here, and its about my first MIDlet.

I got this little game working for a standard Nokia 3500i emulator. I never got around to make it work on a real version because it made null pointer exceptions when i tryed to run it.
Now i got a brand new Sony Ericsson T610, and wnat to make it run on that one, and it wont even compile for the emulator this time. I took our all the Nokia referances, and made a complete compile, but when launcehd it throws this:

java.io.IOException
at javax.microedition.lcdui.ImmutableImage.<init>(+30)
at javax.microedition.lcdui.Image.createImage(+8)
at Map.<init>(+46)
at MyCanvas.<init>(+109)
at OurMidlet.<init>(+20)
at java.lang.Class.runCustomCode(+0)
at com.sun.midp.midlet.Selector.commandAction(+50)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction+152)
at com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+459)
Unable to create MIDlet OurMidlet
java.lang.NullPointerException
at Map.<init>(+58)
at MyCanvas.<init>(+109)
at OurMidlet.<init>(+20)
at java.lang.Class.runCustomCode(+0)
at com.sun.midp.midlet.Selector.commandAction(+50)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction+152)
at com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+459)
startApp threw an Exception
java.lang.NullPointerException
java.lang.NullPointerException
at OurMidlet.startApp(+15)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+225)
at com.sun.midp.dev.DevMIDletSuiteImpl.schedule(+7)
at com.sun.midp.Main.runLocalClass(+20)
at com.sun.midp.Main.main(+92)
destroyApp threw an Exception
java.lang.NullPointerException
java.lang.NullPointerException
at OurMidlet.destroyApp(+4)
at javax.microedition.midlet.MIDletProxy.destroyApp(+8)
at com.sun.midp.midlet.Scheduler.schedule(+252)
at com.sun.midp.dev.DevMIDletSuiteImpl.schedule(+7)
at com.sun.midp.Main.runLocalClass(+20)
at com.sun.midp.Main.main(+92)

I have a feeling it has something to do with my jad file, so here is what it contains:

MIDlet-1: Example6.4, Example6.4.png, OurMidlet
MIDlet-Jar-Size: 100
MIDlet-Jar-URL: Example6.4.jar
MIDlet-Name: Example6.4
MIDlet-Vendor: Unknown
MIDlet-Version: 1.0

All files are in a folder called "Example6.4" and the midlet class is calle d OurMidlet

I hope somebody can point out my mistake.

Lars
 
Punit Raizada
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of WTK are you using .,.. If I am not mistaken the T610 is a MIDP 1.0 device.
 
lars pellarin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Im using WTK1. I just tryed to change the settings to MIDP-1.0 but it still throws all those errors.

The game was build for MIDP-2 in the first place. Are there specific things in the code that arent compatible between the two maybe?

-Lars
 
lars pellarin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I just got it working by going back in version history, to my backup code. But thanks anyway!

Lars
 
Punit Raizada
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations ...
 
lars pellarin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hehe, thanks!

I have a new problem though:

I obdruscated the code, and uploaded it to a wap server, and tryed to download it to my mobil, but when it got through, it said "Invalid Application".

It worked fine on the emulator. Whats the typical explanation for this?

Lars
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic