J2me在JBuilder2007环境下运行出现的错误,帮忙看看!
小弟最近想体验一下在 JBUILDER2007下的编程,配置好环境以后写了一个简单的程序却报如下的错误,还请高手帮我看看,谢谢了!
IWAV0048I Java Bean HelloWorld started with null constructor
IWAV0052E Invocation Target Exception creating HelloWorld
java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.eclipse.ve.internal.java.vce.launcher.remotevm.JavaBeansLauncher.main(JavaBeansLauncher.java:86)
Caused by:
java.lang.UnsatisfiedLinkError: getProperty0
at com.sun.midp.main.Configuration.getProperty0(Native Method)
at com.sun.midp.main.Configuration.getProperty(Configuration.java:33)
at com.sun.midp.midlet.Scheduler.getScheduler(Scheduler.java:142)
at com.sun.midp.midlet.MIDletState. <init> (MIDletState.java:199)
at javax.microedition.midlet.MIDletProxy. <init> (MIDletProxy.java:33)
at javax.microedition.midlet.MIDlet. <init> (MIDlet.java:70)
at HelloWorld. <init> (HelloWorld.java:13)
... 5 more
------解决方案--------------------顺便把代码也贴出来,再次谢过!
public class HelloWorld extends MIDlet {
private Display display = null;
private TextBox tb = null;
public HelloWorld() {
// TODO Auto-generated constructor stub
display = Display.getDisplay(this);
tb = new TextBox( "a ", "c ",11,1);
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
display.setCurrent(tb);
}
}