×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2003
    Location
    UK
    Posts
    6

    Trying to run a simple program on series60

    I am using the J2ME Wirless Toolkit(WT) and using JEdit as my Source Editor. I have copied an example of a Hello Program and saved it as HelloWorldMIDlet.java.

    On J2ME WT

    * created a New project called HelloSer60 and gave the class name HelloWorldMIDlet.

    Compiled the program and got rid of syntax errors using J2ME.

    After Compiling all errors J2ME reports the following:

    Emulator: Missing JAR file.
    Emulator command: D:\WTK20\wtklib\devices\Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1\bin\Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1\epoc32\release\wins\udeb\kmidp_debug.exe -parent_port 2810 -classpath D:Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1\lib\Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1\j2me-debug.zip -descripter c:\tmp\midp\HelloSer60.jad HelloSer60

    java.lang.NullPointerException
    at com.symbian.midp.compatibility.runtime.MIDletExecutor.runMIDlet(+131)
    at com.symbian.midp.compatibility.runtime.MIDletMain.runFirstMIDlet(+77)
    at com.symbian.midp.compatibility.runtime.MIDletMain.run(+346)
    at com.sun.midp.midlet.Main.main(+56)


    *First of all i need the JAR file, how do i create the JAR file?

    *And then there is the java.lang.NullPointerException

    How can i get round this, any help id be most grateful for any input.

    L. Tambiah
    United Kingdom

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    First, you need to run the preverify utility on your classes. Then you can use the jar utility to make the jar file. The jar file contains a manifest, which is a text file describing the contents. Finally, you need the jad, which I'm guessing you already have. The jad file also contains a description of the application, some of which duplicates information in the manifest. The whole lot is described in the WTK documentation.

    Sorry - I know that's a bit brief!! I've written a batch file that automates the basic process for building a simple MIDlet from one source code file, which should give you a reasonable example of the process. You can find it in the post http://discussion.forum.nokia.com/fo...1163#post61163

    I suspect that the null pointer results from not having a jar (and therefore no midlet). Worry about it only if it still happens when you do have a jar!

    Cheers,
    Graham.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •