Creating a new MIDlet

  1. Right click on the project and select New > Java ME MIDlet.

  2. In the New Java ME MIDlet dialog, set the Package and the Name for the class. In this example, com.example is the Package name and Midlet is the Class name.

  3. Click Finish.

  4. Expand your project and go to src > com.example and double click on <yourMIDlet>.java file (in this example, Midlet.java) to open it in the source editor.

    Ensure that the import value is javax.microedition.midlet.MIDlet and not javax.microedition.midlet.* wildcard import.