Unable to create MIDlet null

Discussion in 'Java' started by John Goche, Mar 3, 2006.

  1. John Goche

    John Goche Guest

    Hello,

    Upon compiling and running a MIDlet with the
    Sun Java Wireless Toolkit 2.3 Beta I end up
    getting the following run time error in the
    simulator after I launch the app in the
    simulator:

    Settings updated
    Project settings saved
    Project settings saved
    Building "Foo"
    Build complete
    Running with storage root DefaultColorPhone
    Running with locale: English_United States.1252
    Unable to create MIDlet null
    java.lang.NullPointerException
    at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
    at com.sun.midp.midlet.Selector.run(+22)

    This problem was solved as follows:

    Project -> Settings -> Midlets -> Edit:

    Since my MIDlet is part of a package,
    in the "Class" field, I specify the full
    oath to the MIDlet as follows:

    In the "Class" field, which is left blank
    by the Sun WTK, since my MIDlet is
    part of a package, I specify the full
    path to the MIDlet as follows:

    com.foo.bar.Foo

    This fixes the problem,

    JG
     
    John Goche, Mar 3, 2006
    #1
    1. Advertisements

  2. John Goche

    jallool

    Joined:
    May 9, 2006
    Messages:
    1
    Likes Received:
    0
    Unable to create a classMIDlet

    Hello,

    Upon compiling and running a MIDlet with the
    Sun Java Wireless Toolkit 2.3 Beta I end up
    getting the following run time error in the
    simulator after I launch the app in the
    simulator:

    Settings updated
    Project settings saved
    Project settings saved
    Building "blueMIDlet"
    Build complete
    Running with storage root DefaultColorPhone
    Running with locale: English_United States.1252
    Unable to create MIDlet
    java.lang.classNotFaundException

    can you help me .
     
    jallool, May 9, 2006
    #2
    1. Advertisements

  3. John Goche

    RamiX

    Joined:
    May 5, 2007
    Messages:
    1
    Likes Received:
    0
    thanks

    thanks man for this tip! it helped me alot!!
    i'm looking for the solutino alllready alot of time!
    cheers
     
    RamiX, May 5, 2007
    #3
  4. John Goche

    jayesch

    Joined:
    Nov 12, 2007
    Messages:
    2
    Likes Received:
    0
    Thanks.. This certainly helped me to resolve my problem too. I was not sure where the problem was because Eclipse would pick up my application right but I would get error while running through Java Wireless Toolkit. It is a nice catch, if you use packages.
     
    jayesch, Nov 12, 2007
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.