J2ME+WTK1.0.4+Eclipse3.0.1编译运行问题
J2ME+WTK1.0.4+Eclipse3.0.1 编译的时候没问题,但运行就是过不了,出现一闪而过的现象!
代码如下:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class hello extends MIDlet implements CommandListener
{
private Form form;
private Command quit;
public hello()
{
form = new Form("Life, Guangzhen.");
form.append("HelloWorld.");
form.setCommandListener(this);
quit = new Command("Quit", Command.SCREEN, 1);
form.addCommand(quit);
}
protected void startApp()
{
Display.getDisplay(this).setCurrent(form);
}
protected void pauseApp()
{
}
protected void destroyApp(boolean un)
{
}
public void commandAction(Command command, Displayable displayable)
{
if (command == quit)
{
destroyApp(false);
notifyDestroyed();
}
}
}
控制台提示是:
java.io.IOException: storageOpen() D:\JAVA??\J2ME\Eclipse\eclipse\workspace\hello\hello.jad: No such file or directory
at com.sun.midp.io.j2me.storage.RandomAccessStream.connect(+29)
at com.sun.midp.dev.DevMIDletSuiteImpl.initialize(+42)
at com.sun.midp.dev.DevMIDletSuiteImpl.<init>(+32)
at com.sun.midp.Main.runLocalClass(+15)
at com.sun.midp.Main.main(+68)
Execution completed successfully
5096 bytecodes executed
0 thread switches
317 classes in the system (including system classes)
125 dynamic objects allocated (7160 bytes)
1 garbage collections (0 bytes collected)
Total heap size 500000 bytes (currently 490792 bytes free)
我设置了Midlet为主类hello了 并且设置了调试超时为15000 但问题还是解决不了