http://www.eclipse.org/downloads/
http://java.sun.com/products/sjwtoolkit/
1.ECLIPSE->WINDOWS->PREFERENCES->J2ME 添加WTK的PATH 2.安装DEVICE ECLIPSE->WINDOWS->PREFERENCES->J2ME->Device Management->Import (新手,选中WTK路径,记得refresh) 3.为了在ECLIPSE下可以DEBUG ECLIPSE->WINDOWS->PREFERENCES->JAVA -> Debug 去掉Suspend execution on uncaught exceptions和Suspend execution on compilation errors 并设置Debugger timeout(ms)到15000 4. 让我们开始开发之旅: @File -> New -> Others -> J2ME -> J2ME MIDLET SUITE @输入Project Name (比如: Demo) @选中Project(Demo) @File -> New -> Others -> J2ME -> J2ME MIDLET @输入类名: DemoHelloWorld
import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.TextBox; import javax.microedition.midlet.MIDlet; importjavax.microedition.midlet.MIDletStateChangeException;
public class DemoHelloWorld extends MIDlet implementsCommandListener {
} @右击DemoHelloWorld -> Run As -> Emulated J2ME Midlet |