毕业设计(论文)外文资料翻译
系 部: 计算机科学与技术系
专业年级: 计算机科学与技术07级
姓 名: 张三丰
学 号: 0707075707
附 件: What's New in the J2ME Wireless Toolkit 2.2
指导老师评语:
签 名:
年 月 日
What's New in the J2ME Wireless Toolkit 2.2
By Jonathan Knudsen
June 2004
The award-winning J2ME Wireless Toolkit has become the de facto standard toolkit for developing applications for Java 2, Micro Edition (J2ME). Since its debut in 2000, the toolkit has evolved to keep pace with the rapidly changing face of mobile Java technology. Don't be misled by the small change in version number from 2.1. The new toolkit supports new optional APIs specified through the Java Community Process (JCP) in four vital areas: 3D graphics, multimedia messaging, Bluetooth networking, and data management. In this article I'll describe these new APIs and show you how they're implemented in the toolkit.
Before I do, take a moment to admire the updated DefaultColorPhone emulator skin. Since version 2.1, this skin has gotten a larger screen (320 x 240, or QVGA) and far more colors (4096 instead of 256).
Mobile 3D Graphics
JSR 184, the Mobile 3D Graphics API for J2ME (M3G), provides three-dimensional graphics functionality in a compact package that's appropriate for devices that support the most widely adopted J2ME software stack, the Connected, Limited Device Configuration (CLDC) and the Mobile Information Device Profile (MIDP). The API provides two APIs for displaying 3D content. The immediate mode API makes it possible for applications to create and manipulate 3D elements directly. On top of this layer is a scene graph API, also called retained mode, that makes it possible to load and display entire 3D scenes you've designed ahead of time. Applications may use whichever API is most appropriate, or a combination of retained mode and immediate mode. The JSR 184 specification also defines a file format for scene graphs, .m3g.
The toolkit's emulator fully supports JSR 184 and you'll find several MIDlets that show off the API's capabilities in the Demo3D project.
Life3D demonstrates the use of immediate mode:
PogoRoo is an interactive demonstration that features a bouncing kangaroo:
Multimedia Messaging
The J2ME Wireless Toolkit has long supported JSR 120, version 1.1 of the Wireless Messaging API (WMA); the new release supports WMA 2.0 (JSR 205), which expands WMA's capabilities to include Multimedia Messaging.
In the toolkit, messaging takes place in a simulated environment. If you run the emulator multiple times, applications on the emulators can communicate with each other, and you can use the toolkit's handy WMA Console utility to exchange messages with the applications in the same environment. Messages may conform to any of three standard protocols: Short Message Service (SMS), Cell Broadcast Service (CBS), or - new in version 2.2 of the toolkit - Multimedia Messaging Service (MMS).
You can address MMS messages and add any collection of files to the message.
Figure 1 Send a Message
Furthermore, the network monitor now displays MMS messages that are sent or received by the emulator.
Bluetooth and OBEX
The J2ME Wireless Toolkit emulator supports JSR 82, the Java APIs for Bluetooth, which includes two independent APIs:
The Bluetooth API provides an interface to Bluetooth wireless networking, including device discovery and data exchange.
The OBEX API allows applications to use the Object Exchange (OBEX) protocol over Bluetooth or other communication channels.
The toolkit allows you to develop and test applications that use Bluetooth technology even if you don't have any actual Bluetooth hardware. The toolkit simulates a Bluetooth environment, in which you can run multiple emulator instances that can discover each other and exchange data using the Bluetooth API.
An example application, BluetoothDemo, shows how to transfer images from one emulator to another.
The J2ME Wireless Toolkit implements OBEX transfer over simulated Bluetooth and infrared connections. The simulated infrared connection follows the IrDA standard defined by the Infrared Data Association. The toolkit simulates infrared transfers between multiple running emulators.
You can configure the Bluetooth and OBEX environment using the Bluetooth/OBEX tab in the toolkit preferences. This controls such parameters as how long the emulator attempts to discover other devices in the simulated Bluetooth environment and the maximum packet size. See the toolkit's User's Guide for more details.
J2ME Wireless Toolkit 2.2 新改进
作者:Jonathan Knudsen
2004 年 6 月
屡获殊荣的 J2ME Wireless Toolkit 已经成为事实上的Java 2微型版(J2ME)应用程序的标准工具包。自从2000年首次亮相以来,该工具包已经发展到跟上移动 Java 技术迅速变化的步伐。不要被从 2.1 版本以来的小改变所误导。新的工具包在四个重要的领域支持 Java Community Process (JCP) 所指定的新的可选 API:3D 图形、多媒体通信、蓝牙网络和数据管理。本文将描述这些新的API 并且向您展示如何在工具包中实现他们。
在这之前,让我们欣赏一下更新后的 DefaultColorPhone 模拟器皮肤,自从 2.1 版本以来,该皮肤已有了一个更大的屏幕(320 x 240, 或 QVGA)和更多的颜色(4096 色而不是 256 色)。
移动 3D 图形
JSR 184,即Mobile 3D图形API为J2ME (M3G) 在一个集成软件包中提供了三维图形功能,适用于支持最为广泛采用的 J2ME 软件栈、有限连接设备配置(CLDC)和移动信息设备描述(MIDP)的设备。API 为显示 3D 内容提供了两种 API。立即模式 API 使应用程序能够直接创建和操纵 3D 元素。这一层之上是一个场景图 API,也称为保留模式,能够提早加载并显示已设计的整个 3D 场景。应用程序可以采用最适合的 API,或保留模式与立即模式的组合。JSR 184 规范还为场景图定义了一种文件格式-.m3g。
该工具包的模拟器全面支持 JSR 184,并且有几个 MIDlet 展示了 API 在 Demo3D 项目中的功能。
PogoRoo 是一个的交互的演示,特点是显示一只跳跃的袋鼠:
最后,retainedmode显示如何加载和渲染一个场景图文件:
图-1 发送消息
而且,现在网络监视器能够显示模拟器发送或接收的 MMS 消息。
结束语
J2ME Wireless Toolkit 2.2 不仅仅是一个出色工具的增量更新。它包括了对令人激动的四项新规范的支持,同时定义了六种新的 API。随着无线 Java 技术世界的快速发展,J2ME Wireless Toolkit 紧紧跟随发展的步伐并且包含您所需的全部工具。