毛蛋(maoegg)网

——只为技术而存在

正在浏览 JAVA地狱 里的文章

甲骨文今天宣布,Java Development Kit 7(Java开发者工具包)将于2011年7月28日推出。甲骨文同时表示,公司已于昨天向Javap社区进程执行委员会(Java Community Process Executive Committee)提交了Java 7 和8的信息,并等待批准。Java平台首席架构官马克·莱因霍尔德(Mark Reinhold)在其博客中表示,两周内将会得到结果。

Java 7提交的材料显示,不断提高Java开发者的效率,是保持Java SE平台处于软件开发前沿的重点。针对开发者,以安全实用的方法利用多核CPU,是所有Java应用的基础。

伴随在JVM上新编程语言的来临,JVM反映语言工具的需求,以及Java语言能与那些语言进行互操作变得很重要。为提供具有竞争力的用户体验,Java应用有时需要有能力以可控制和可测试的方式,访问和使用潜在平台文件系统的基本语言。

Java 8提交的材料显示,针对开发者,以安全实用的方法利用多核CPU,是所有Java应用的基础。模块是开发、布置、管理和演化所有Java应用的基础组件。现有框架与工具支持目前这些任务,但Java SE平台的标准化将推动互操作性,有利于开发者、用户及卖家

刚换的系统,环境是:
JDK 1.6
Java_ME_platform_SDK_3.0
ME插件 eclipseme.feature_1.7.9
IDE eclipse 3.4
配置好以后(感觉已经配置好了),敲一段测试代码试试,但是出了问题,点击“运行”按钮,就是不出来模拟器 ..然后console 出来下面一大堆的 东西..

Syntax:
emulator [arguments]In order to get commands supported by given device run:
emulator.exe -Xdevice: -Xquery

Generic list of arguments is:

-version Display version information about the emulator
-help Display list of valid arguments
-classpath, -cp The class path for the VM
-D= Set a system property
-Xdebug Use a remote debugger
-Xrunjdwp:[transport=
,address=

,server=
suspend=]
Debugging options
-Xdevice: Select a device skin for the emulator
-Xdomain:
Set the MIDlet suite’s security domain

-Xquery Print device information
-Xjam[:install= | force | list | storageNames |
run=[ | ] |
remove=[ | | all]]
Java Application Manager and support
for Over The Air provisioning (OTA)
-Xautotest:
Run in autotest mode
-Xdescriptor:
The JAD file to be executed

压根就不出来模拟器…
以前的系统装了WTK 2.5.2 ,运行很正常,一点事都没有
新的 SDK 3.0(sun_java_me_sdk-3_0-win ) 那就有问题了,网上查资料
安装好SDK3.0以后WTK2.5.2无法安装(安装出错),那只能使用SDK3.0,网上又说SDK3.0只能使用MTJ而没法使用eclipseme

网上有说用SDK3.0+eclipseme的解决办法:
eclipse->window->preference->java->debug
suspend Execution的三个勾都要去掉。
debugger timerout 设置为 300000
但是我试过之后,还是不行
因为eclipseme 1.7.9 不支持JAVAME SDK 3.0, 你得要把eclipseme 1.7.9升级到MTJ (Mobile tools for Java)

最后在eclipse官网上下到专门为手机开发的eclipse-pulsar(集成了大量补丁),所以放弃以上两种组合使用pulsar
然后我用 RUN 模拟器是 DefaultCldcJtwiPhone1

用Eclipse Me写了一段载入图片的程序,运行后一直报以下错误:
java.io.IOException
at javax.microedition.lcdui.ImmutableImage.getImageFromStream(+15)
at javax.microedition.lcdui.ImmutableImage.(+20)
at javax.microedition.lcdui.Image.createImage(+8)
at testImages.(+57)
at java.lang.Class.runCustomCode(+0)
at com.sun.midp.midlet.MIDletState.createMIDlet(+34)
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.

继续阅读