aspose file tools*
The moose likes Java Micro Edition and the fly likes Small MIDlet in BIG trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Small MIDlet in BIG trouble" Watch "Small MIDlet in BIG trouble" New topic
Author

Small MIDlet in BIG trouble

Alex Zhang
Ranch Hand

Joined: Apr 19, 2001
Posts: 68
I have tried some MIDlet programming.
my classpath setting is:
c:\jdk1.3.1\lib;c:\j2mewtk\midpapi.zip;c:\j2mewtk\kenv.zip
I can successfully compile and preverify my MIDlet
after I generated the jad and the jar files, I even can get the prc file. But when I place it for running in the emulator, I cannot run and I have checked there is exception. But I completely following the instruction from Core J2ME sample.
ANd the exception is:
KVM stdout: 9 Feb 2002, 0:46
Unable to create MIDlet:null
java.lang.NullPointerException
at com.sun.midp.midlet.Selector.SingleMIDletRunDirectly(+22)
at com.sun.midp.midlet.Selector.startApp(+8)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+189)
at com.sun.midp.midlet.Main.main(+133)
startApp threw an Exception
java.lang.RuntimeException: java.lang.NullPointerException
at com.sun.midp.midlet.Selector.SingleMIDletRunDirectly(+79)
at com.sun.midp.midlet.Selector.startApp(+8)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+189)
at com.sun.midp.midlet.Main.main(+133)
Can anyone plz help me to solve this!? THX
Liam Quinn
Ranch Hand

Joined: Jan 18, 2002
Posts: 35
Possibly the class name for your MIDlet doesn't match the class name given in your JAD. If you have
MIDlet-1: foo, foo.png, bar
in your JAD file, then you need to have a class named "bar" that extends javax.microedition.midlet.MIDlet.
john muchow
Ranch Hand

Joined: Mar 24, 2001
Posts: 49
If after trying Liam's answer you still have problems, post your JAD file, manifest file and the command line you are using to start the MIDlet.
John
Author Core J2ME
Alex Zhang
Ranch Hand

Joined: Apr 19, 2001
Posts: 68
Hi John,
THX for your help! I am sure my JAD file and the source matches! and now I have got the whiteboard sdk, and use it to generate the JAD file for me and I compare it with mine, they are identical
But using the preverify version from the Whiteboard sdk it works! So I can work find on it.
Or I should recommend guys try the whiteboard sdk.
Anyway THX for your help and your book! But will U have an more advance version for J2ME as I find in the book, it is mostly about UI and I would like to know more about ME
But it is really a good book for me
sree laksmi
Greenhorn

Joined: Aug 13, 2003
Posts: 2
Hi,
I need to run 1 midlet on one cellphone as a Server and other midlet as a client on another cell phone. The communication between these two should happen.
I could compile and preverify all my .java files. As I have 2 midlets which extend the main midlet, neither I know what project name I should be giving nor the name in the jad file.
Say I have,
ABCmidlet extends MIDlet
XYZmidlet extends MIDlet
I have 2 more files which are RMS relevant.
I need an address book to be exchanged between these 2 midlets. I'm presuming the ABC will come up in one emulator and XYZ comes up in the second one. I don't know how to make a midlet suite here and what nae to give in the JAD.
Answer to this question is very important to me. Please reply at the earliest.
Thanks
-sree
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Small MIDlet in BIG trouble