哪位能帮忙看看这个J2ME的helloworld怎么不能运行啊?
我刚学J2ME,才写了个helloworld程序就运行不了。程序如下:importjavax.microedition.midlet.*;importjavax.micr...
我刚学J2ME,才写了个helloworld程序就运行不了。程序如下:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
//import javax.microedition.midlet.MIDletStateChangeException;
public class helloword extends MIDlet {
private Display display;
private Form t;
public helloword() {
// TODO Auto-generated constructor stub
display=Display.getDisplay(this);
t=new Form("test");
t.append("Hello,word!");
}
public void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
display.setCurrent(t);
}
public void pauseApp() {
// TODO Auto-generated method stub
}
public void destroyApp(boolean unconditional) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}
运行后出现wtk自带模拟器但闪一下就没了,上面什么都没有。控制台的异常提示如下:
正在通过存储根 C:\Documents and Settings\fengkeqin\j2mewtk\2.5.2\appdb\MediaControlSkin 来运行
Running with locale: Chinese_People's Republic of China.936
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: helloword
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
Execution completed.
3394178 bytecodes executed
30 thread switches
1667 classes in the system (including system classes)
17613 dynamic objects allocated (524736 bytes)
1 garbage collections (0 bytes collected)
哪位知道是怎么回事?? 展开
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
//import javax.microedition.midlet.MIDletStateChangeException;
public class helloword extends MIDlet {
private Display display;
private Form t;
public helloword() {
// TODO Auto-generated constructor stub
display=Display.getDisplay(this);
t=new Form("test");
t.append("Hello,word!");
}
public void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
display.setCurrent(t);
}
public void pauseApp() {
// TODO Auto-generated method stub
}
public void destroyApp(boolean unconditional) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}
运行后出现wtk自带模拟器但闪一下就没了,上面什么都没有。控制台的异常提示如下:
正在通过存储根 C:\Documents and Settings\fengkeqin\j2mewtk\2.5.2\appdb\MediaControlSkin 来运行
Running with locale: Chinese_People's Republic of China.936
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: helloword
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
Execution completed.
3394178 bytecodes executed
30 thread switches
1667 classes in the system (including system classes)
17613 dynamic objects allocated (524736 bytes)
1 garbage collections (0 bytes collected)
哪位知道是怎么回事?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询