这几天一直在弄雷哥的j2me,对j2me的方法不是很熟,不过挡不住百度。。。
代码写完了,明处的错误没有了 准备运行一下结果错误come 了。
Running with storage root C:\Documents and Settings\Administrator\j2mewtk\2.5.2\appdb\DefaultGrayPhone
Running with locale: Chinese_People's Republic of China.936
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: BTGame
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.
3335041 bytecodes executed
12 thread switches
1667 classes in the system (including system classes)
17248 dynamic objects allocated (514496 bytes)
1 garbage collections (0 bytes collected)
从网上查找资料大概三种可能:
1,OTA的原因:
eclipse据说不支持OTA的调试,所以有可能在使用OTA方式的时候会出现上述问题。
方法是点击菜单Run->Run...出现设置对话框,将executable下的方式改为Midlet,并输入要运行的Midlet名称
2,Java的Debug配置
据说Java开始Debug有个超时的限制,有时在这个时间限制内没有打开模拟器,就会认为调试超时,程序自动退出。
方法是在菜单Window->Preferences...出现设置对话框,选择左侧Java->Debug...右侧将Communication的Debugger timeout时间设置的长一些,比如15000。
3,程序问题
我最初就是因为这个原因,出现了上述症状。这种时候注意看看Console里的异常信息,可能是外部文件找不到,结构没有初始化,文件建立的方式不正确等等原因。
我的错误文件建立的路径不正确,采用的Eclipse -galileo,wtk采用的是2.52的。为了实现蓝牙功能没办法,找好采用比较高的技术了。。
这个错误是搞定了,不过似乎道路并不平坦,忍着吧。。准备九九次吧!!!
代码写完了,明处的错误没有了 准备运行一下结果错误come 了。
Running with storage root C:\Documents and Settings\Administrator\j2mewtk\2.5.2\appdb\DefaultGrayPhone
Running with locale: Chinese_People's Republic of China.936
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: BTGame
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.
3335041 bytecodes executed
12 thread switches
1667 classes in the system (including system classes)
17248 dynamic objects allocated (514496 bytes)
1 garbage collections (0 bytes collected)
从网上查找资料大概三种可能:
1,OTA的原因:
eclipse据说不支持OTA的调试,所以有可能在使用OTA方式的时候会出现上述问题。
方法是点击菜单Run->Run...出现设置对话框,将executable下的方式改为Midlet,并输入要运行的Midlet名称
2,Java的Debug配置
据说Java开始Debug有个超时的限制,有时在这个时间限制内没有打开模拟器,就会认为调试超时,程序自动退出。
方法是在菜单Window->Preferences...出现设置对话框,选择左侧Java->Debug...右侧将Communication的Debugger timeout时间设置的长一些,比如15000。
3,程序问题
我最初就是因为这个原因,出现了上述症状。这种时候注意看看Console里的异常信息,可能是外部文件找不到,结构没有初始化,文件建立的方式不正确等等原因。
我的错误文件建立的路径不正确,采用的Eclipse -galileo,wtk采用的是2.52的。为了实现蓝牙功能没办法,找好采用比较高的技术了。。
这个错误是搞定了,不过似乎道路并不平坦,忍着吧。。准备九九次吧!!!