感觉EclipseMe的插件总是有问题。同样的MIDlet2.0程序,有的时候会出现
** Error installing suite (39): The JAD matches a version of a suite already installed.
Execution completed.错误(MIDlet 1.0不知道有没有)
笔者配置:
CPU :P4 2.4G,Memary:1GB。HardDisk 80G*2;
Windows 2000 Server
Eclipse 平台 版本:3.0.1
EclipseMe 版本:0.6.0
WTK:2.2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
上google查了一下资料。发现2个文章一个是俄罗斯文的(看不懂了)。另一个是sun社区的文章。
如下:
| |||
Could anyone help me about the error below that I encountered when I executed an MIDP sample program via my web server? Error installing suite (39): The JAD matches a version of a suite already installed Thanks in advance |
| ||||
|
看了看,大概是叫重新,安装MIDlet了。后来发现,这个是和EclipseMe虚拟的Device有关。(因为我用J2ME Wireless Toolkit 2.2编译运行没有问题)。换了一下Device,选择QwertyDevice就没有问题了。不过这个东西不像手机了,看起来就是一个pda。还在能运行了,具体界面用notepad+WTK改吧。
不过选择了QwertyDeivce运行后,在选择其他Device运行出错的几率减小了。
还有就是用Eclipse开发时,res路径似乎不是默认资源路径。在程序中需要显式写入此路径,这个和 WTK兼容就出了问题。(当然本人初学,这个配置不清楚)。
例如:/res/img/chessboard.png 是在Eclipse中的路径。
/img/chessboard.png 是在WTK的路径。
好在Java是面向对象的,这些差异就没什么了。