Right click on the project and select New > Java ME MIDlet.
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.
Click Finish.
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.