應用eclipse搭建J2ME手機開發環境
1 下載 eclipse3.1 \ jwtk2.2 \ eclipseme1.2.3
eclipse3.1的下載地址:http://www.eclipse.org/2 安裝 eclipse 到 d:\eclipse3.1 ;
jwtk2.2 到 d:\jwtk2.2 (為jwtk2.2打patch)3 配置eclipseme到eclipse
<1>啟動 eclipse->點擊 help ->點擊 software updates ->點擊 find and install ->選擇 search for new features to install->點擊 next ->點擊 new archived site -> 選擇 eclipseme1.2.3.zip - > 點擊 finish -> 重新啟動eclipsepackage com.agile.J2ME.core; import Javax.microedition.midlet.MIDlet;import Javax
new TextBox("測試程序", "hellWorld", 20, 0); // TODO Auto-generated constructor stub } protected void startApp() throws MIDletStateChangeException { // TODO Auto-generated method stub Display.getDisplay(this).setCurrent(tBox); } protected void pauseApp() { // TODO Auto-generated method stub } protected void destroyApp(boolean arg0) throws MIDletStateChangeException { // TODO Auto-generated method stub }}<5>運行 -> 選擇run as -> emulated J2ME midlet.
<6>手機模仿界面呈現helloworld字樣,配置成功.