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
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.
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
Joined: Apr 19, 2001
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
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