我的一个程序,帮忙看一下~~@_@
经过千辛万苦,终于在QD上运行了Hello World……
然后运行自己的一个程序。。
Wireless Toolkit 2.5.1,ea上测试通过
拿到QD上,运行,就显示“Application Error,exiting...”
为什么?该怎么办?
用MIDP-1.0,CLDC-1.0
附程序源代码:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;
public class Check extends MIDlet implements CommandListener
{
private Form fm, fm2;
private Display ds;
private Command exitCom;
private Command enterCom;
private TextField tf;
private StringBuffer result=new StringBuffer();
public Check()
{
ds = Display.getDisplay (this);
tf = new TextField ( "How many ", " ", 10, TextField.DECIMAL);
exitCom = new Command ( "Exit ", Command.EXIT, 1);
enterCom = new Command ( "OK ", Command.EXIT, 1);
fm = new Form( "Check ");
fm.append (tf);
fm.addCommand (exitCom);
fm.addCommand (enterCom);
fm.setCommandListener (this);
}
protected void startApp()
{
ds.setCurrent (fm);
}
protected void pauseApp()
{}
protected void destroyApp(boolean u)
{}
public void commandAction (Command c, Displayable d)
{
if (c == exitCom)
{
destroyApp (false);
notifyDestroyed();
}
if (c == enterCom)
{