[J2ME] eclipseME可以順利跑程式但在WTK卻不能跑??
大家好,我是第一次寫J2ME的程式
我是用eclipseMe寫的一支簡單的程式
程式碼如下
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
public class ZeroMain extends MIDlet {
Display dis;
Form form;
public ZeroMain() {
dis=Display.getDisplay(this);
form=new Form("test");
form.append("this is test");
// TODO Auto-generated constructor stub
}
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
dis.setCurrent(form);
}
}
在eclipseMe模擬器有出現"this is test"
但是我想用WTK包成jar檔(我是用WTK2.5.2)編譯雖然成功
但是跑模擬器卻出現以下的訊息
專案 "demo" 已載入
專案設置已保存
正在生成 "demo"
生成完成
使用儲存體根 C:\Documents and Settings\USER\j2mewtk\2.5.2\appdb\DefaultColorPhone 來執行
Running with locale: Chinese_Taiwan.950
Running in the identified_third_party security domain
Unable to create MIDlet demo
java.lang.ClassNotFoundException: demo
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Selector.run(+22)
結果沒有跑出"this is test" 而出現異常 java.lang.ClassNotFoundException
的訊息,請問這是什麼問題嗎??
感謝指教
P.S 我跑WTK內的其他內建app都成功
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.118.122.160
推
11/26 17:29, , 1F
11/26 17:29, 1F
→
11/26 17:31, , 2F
11/26 17:31, 2F
→
11/27 12:33, , 3F
11/27 12:33, 3F