<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
首先是准备环境吧, 这里 JDK(JRE), ECLIPSE, WTK, 这几项就不多讲了,直接安装,网上说得也很多,我上一篇也说过,配置好之后,就可以模拟手机程序了,
说来很好笑,刚开始自己都是乱撞一起,装了 SDK 版本都不知道用哪个,可能英语水平太低了。实在惭愧,直接下这里的就 OK 了,其实很多地方的都是大同小异,都是同样的效果,因为,插件用到的就是那点点需要。 我的版本是 nS60_jme_sdk_3rd_e_FP1.zip ,解压之后,一个安装到 Eclipse 目录下,一个是 netbean 的,还有一个是 SDK ,安装即可, 当然这里看你的要求了。 http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Java.xhtml
由于自己是用的 Nokia ,所以这里下了个模拟,想做这个开发来实践下,断断续续的配置,今天终于还是能够成功的运行了,不管怎么样, 还是有一点点收获的。
这里主要是关于两个问题。 jar file could not be initialized 和 failed to initialized session 下面是解决方案,有问题的,可以留言,一起解决。
自己遇到的问题,所有都拿出来了,呵呵,没有一点保留,当然对大部分人是没有用处的,不过对很小很小一小部分人,还是有所帮助的。 |
最开始遇到的问题
第一个问题 | jar file could not be initialized
|
| Windows -> Preferences -> J2ME -> Device Management
选择 S60 的 device/emulator 后选 edit
在出现的 Basic 页里的 Launch Command Template 中
将 [%classpath %| - classpath "%classpath %"] 删掉
但是出现了新的问题 == 》 failed to initialized session |
以下是备份 | |
%executable% [%debugPort%|-Xdebug -Xrunjdwp:transport=dt_socket,suspend=y,server=y,address=%debugPort%] [%classpath %|-classpath "%classpath %"] -Xdevice :%device% [%jadfile %|"-Xdescriptor :%jadfile %"] [%verbose%|-Xverbose :%verbose%] [%heapsize %|-Xheapsize :%heapsize %] [%securityDomain%|-Xdomain :%securityDomain%] %userSpecifiedArguments% [%target%|%target%] [%otaurl %|-Xjam:transient=%otaurl %] |
第二个问题 | 由第一个留下来的 failed to initialized session
|
| 首先在安装目录下找到 /bin/epoc32/tools/ecmt /config /config.properties 将你的 JRE 版本放到里面,比如: epdt.java.version.start=1.4.1,1.4.2,1.5,5.0,1.6
其次是将运行方式改变: 从 s60 devices 变为 s60 emulator
|
这里虽然查了下网上的很多说法,不过的确有点匪夷所思的感觉,也许是以前没有遇到过这样的问题。或者是自己才接触到新东西,所以才会这样? 想想,就拿第二个问题来说,根据报错来看,完全可以解决掉,首先是设备和仿真的问题,是跟手机设备连接呢?还是电脑模拟仿真?这个显而易见的。 可是自己为什么没有解决掉?第一个路径当然这里不好说了,因为自己还得继续深造,呵呵,希望跟大家一起努力吧。 |