买了个moto E680i智能手机,linux系统,支持java。于是打算写个程序玩玩。用的是eclipse me,jdk1.42,很简单的一个程序。代码很简单,经典的helloworld程序。
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
public class Hello extends MIDlet {
public Hello() {
super();
// TODO Auto-generated constructor stub
Form form=new Form("Hello Moto!");
form.append("Hello to Moto's world!");
Display.getDisplay(this).setCurrent(form);
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}