为什么我运行这个手机程序会有错误呢?

WIN32long 2010-12-18 10:37:08
/** TestCreateProject.java*/

import javax.microedition.midlet.*;import javax.microedition.lcdui.*;
/** * The application must extend this class to allow the application * management software to control the MIDlet and to be able to retrieve * properties from the application descriptor */
public class TestCreateProject extends MIDlet implements CommandListener {
private Command exitCmd = new Command("Exit", Command.EXIT, 1); private Display display; private Form mainForm;
/** * Constructor for the MIDlet, * initializations of the form */
public TestCreateProject(){ }
/** * Signals the MIDlet to terminate and enter the Destroyed state. * In the destroyed state the MIDlet must release all resources and * save any persistent state * @param unconditional If true when this method is called, the * MIDlet must cleanup and release all resources. If false the * MIDlet may throw MIDletStateChangeException to indicate * it does not want to be destroyed at this time. * */
protected void destroyApp(boolean unconditional){
}
/** * Signals the MIDlet to enter the Paused state. * In the Paused state the MIDlet must release shared resources. */
protected void pauseApp(){
}
/** * Signals the MIDlet that it has entered the Active state * The method will only be called when the MIDlet is in the Paused state * Performs some initialization, places app in active state *@exception MIDletStateChangeException is thrown if the MIDlet cannot * start now but might be able to start at a later time. */
protected void startApp()throws MIDletStateChangeException{
display = Display.getDisplay(this); mainForm = new Form("TestCreateProject"); mainForm.addCommand(exitCmd); mainForm.setCommandListener(this); display.setCurrent(mainForm);
}
public void commandAction(Command c, Displayable d) { if (c == exitCmd) { destroyApp(false); notifyDestroyed(); }
}
}
//这是代码
一运行就会出现如下错误。
java.lang.NullPointerException: 0 - java.lang.Class.forName(), bci=0 - com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1 - com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=66 - com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17 - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=27 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161 - com.sun.midp.main.MIDletSuiteLoader.main(), bci=22TRACE: <at java.lang.NullPointerException: 0>, Error occurred processing MIDlet event 21java.lang.NullPointerException: 0 - com.sun.midp.main.MIDletProxyList.findMIDletProxy(), bci=52 - com.sun.midp.main.MIDletProxyList.handleMIDletDestroyNotifyEvent(), bci=3 - com.sun.midp.main.MIDletControllerEventListener.process(), bci=335 - com.sun.midp.events.EventQueue.run(), bci=179 - java.lang.Thread.run(), bci=11TRACE: <at java.lang.NullPointerException: 0>, Error occurred processing MIDlet event 22java.lang.NullPointerException: 0 - com.sun.midp.main.MIDletProxyList.handleDisplayCreateNotifyEvent(), bci=56 - com.sun.midp.main.MIDletControllerEventListener.process(), bci=393 - com.sun.midp.events.EventQueue.run(), bci=179 - java.lang.Thread.run(), bci=11

同时出现的手机屏幕会是如我附件上传的图片一样,这是怎么回事呢?希望有人帮个忙。

同时手机界面出现这个错误。链接地址在这儿。希望有人解答下。http://wenwen.soso.com/z/q247213968.htm
...全文
93 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
WIN32long 2010-12-23
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 programmerno1 的回复:]
貌似软件环境还没搭建成功
[/Quote]
我也这么觉得。
eb047 2010-12-23
  • 打赏
  • 举报
回复
。。。。。支持下!!!
ProgrammerNO1 2010-12-22
  • 打赏
  • 举报
回复
貌似软件环境还没搭建成功
nb_lte_5G 2010-12-22
  • 打赏
  • 举报
回复
这个太难 整不了

567

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧