logo资料库

计算机相关专业本科生毕业设计标准外文翻译一篇(外文+翻译).doc

第1页 / 共12页
第2页 / 共12页
第3页 / 共12页
第4页 / 共12页
第5页 / 共12页
第6页 / 共12页
第7页 / 共12页
第8页 / 共12页
资料共12页,剩余部分请下载后查看
附件 1:外文资料翻译译文(复印件) 移动设备的应用平台—J2ME 简介 1.什么是 J2ME: J2ME(Java 2 Micro Edition)是 Java 2 的一个组成部分,它与 J2SE、J2EE 并 称。根据 Sun 的定义:J2ME 是一种高度优化的 Java 运行环境,主要针对消费类 电子设备的,例如蜂窝电话和可视电话、数字机顶盒、汽车导航系统等等。J2ME 技术在 1999 年的 JavaOne Developer Conference 大会上正式推出,它将 Java 语言 的与平台无关的特性移植到小型电子设备上,允许移动无线设备之间共享应用程 序。 J2ME 在设计其规格的时候,遵循着对于各种不同的装置而造出一个单一的 开发系统是没有意义的事」这个基本原则。于是 J2ME 先将所有的嵌入式装置 大体上区分为两种 :一种是运算功能有限、电力供应也有限的嵌入式装置(比方 说 PDA 、手机);另外一种则是运算能力相对较佳、并请在电力供应上相对比较 充足的嵌入式装置 (比方说冷气机、电冰箱、电视机上盒 (set-top box))。因为这 两种型态的嵌入式装置,所以 Java 引入了一个叫做 Configuration 的概念,然后 把上述运算功能有限、电力有限的嵌入式装置定义 Connected Limited Device Configuration(CLDC)规格之中;而另外一种装置则规范为 Connected Device Configuration(CDC) 规 格 。 也 就 是 说 ,J2ME 先 把 所 有 的 嵌 入 式 装 置 利 Configuration 的概念区隔成两种抽象的型态。 其实在这里大家可以把 Configuration 当作是 J2ME 对于两种类型嵌入式 装置的规格,而这些规格之中定义了这些装置至少要符合的运算能力、供电能力、 记忆体大小等规范,同时也定了一组在这些装置上执行的 Java 程序所能使用的 类别函式库、这些规范之中所定义的类别函式库为 Java 标准核心类别函式库的 子集合以及与该型态装置特性相符的扩充类别函式库。比方就 CLDC 的规范来 说,可以支援的核心类别函式库为 java.lang.* 、java.io.*、java.util.*,而支援的 扩充类别函式库为 java.microedition.io.*。区分出两种主要的 Configuration 之后, J2ME 接著在定义出 Profile 的概念。Profile 是架构在 Configuration 之上的规格。 之所以有 Profile 的概念,是为了要更明确地区分出各种嵌入式装置上 Java 程序 该如何开发以及它们应该具有哪些功能。因此 Profile 之中定义了与特定嵌入式
装置非常相关的扩充类别函式库,而 Java 程序在各种嵌入式装置上的使用者介 面该如何呈现就是定义在 Profile 里头。Profile 之中所定义的扩充类别函式库是 根据底层 Configuration 内所定义的核心类别函式库所建立。 2. J2ME Wireless Toolkit 2.2 新改进 J2ME Wireless Toolkit 已经成为 J2ME 开发应用程序的事实标准工具包。 自从 2000 年初次亮相以来,该工具包一直在发展以赶上移动 Java 技术外观上 快速改变的步伐。不要被从 2.1 版本以来的小改变所误导。新的工具包在四个 重要的领域支持 Java Community Process (JCP) 所指定的新的可选 API:3D 图形、多媒体通信、蓝牙连网(Bluetooth networking)和数据管理。本文将描述 这些新的 API 并且向您展示如何在工具包中实现他们。在这之前,让我们赞美 一下更新后的 DefaultColorPhone 模拟器皮肤,自从 2.1 版本以来,该皮肤已有 了一个更大的屏幕(320 x 240, 或 QVGA)和更多的颜色(4096 色而不是 256 色)。 2.1 移动 3D 图形: JSR 184, 即 Mobile 3D 图形 API for J2ME (M3G) 在一个集成软件包中 提供了三维图形功能,适用于支持最为广泛采用的 J2ME 软件栈、有限连接设 备配置(CLDC)和移动信息设备描述(MIDP)的设备。API 为显示 3D 内容 提供了两种 API。立即模式 API 使应用程序能够直接创建和操纵 3D 元素。这 一层之上是一个场景图 API,也称为保留模式,能够提早加载并显示已设计的整 个 3D 场景。应用程序可以采用最适合的 API,或保留模式与立即模式的组合。 JSR 184 规范还为场景图定义了一种文件格式-.m3g。 该工具包的模拟器全面支持 JSR 184,并且有几个 MIDlet 展示了 API 在 Demo3D 项目中的功能。Life3D 演示了立即模式的使用。PogoRoo 是一个的交 互的演示,特点是显示一只跳跃的袋鼠。 2.2 多媒体通信: J2ME Wireless Toolkit 长期支持 JSR 120、Wireless Messaging API(WMA) 的 1.1 版本;新版本支持 WMA 2.0(JSR 205),其把 WMA 的功能扩展到包括 多媒体通信。
在工具包中,通信发生于模拟的环境中。如果多次运行模拟器,模拟器上 的应用程序能够相互通信,并且可以使用工具包方便的 WMA Console 实用程序 在同一环境中与应用程序交换消息。通信可以遵照以下三种标准协议之一:短消 息服务(Short Message Service,SMS)、蜂窝广播服务(Cell Broadcast Service, CBS)或工具包 2.2 版本中的新协议-多媒体通信服务(MMS)。 您可以标记 MMS 消息,并向消息添加任何文件集合。而且,现在网络监 视器能够显示模拟器发送或接收的 MMS 消息。 2.3 蓝牙和 OBEX: J2ME Wireless Toolkit 模拟器支持 JSR 82,即 Java API for Bluetooth,包 括两个独立的 API: 蓝牙 API 为蓝牙无线网络提供了接口,包括设备恢复和数据交换。 OBEX API 允许应用程序在蓝牙或其他通信信道上使用对象交换(Object Exchange,OBEX)协议。 该工具包允许在即使没有实际蓝牙硬件的情况下,也可以开发和测试采用 蓝牙技术的应用程序。该工具包模拟蓝牙环境,您可以在该环境中运行可相互发 现的多个模拟器实例和使用蓝牙 API 交换数据。 应用程序实例 BluetoothDemo 显示了如何从一个模拟器将图像传输到另 一个模拟器。 J2ME Wireless Toolkit 通过模拟的蓝牙和红外连接上实现 OBEX 传输。模 拟的红外连接遵循 Infrared Data Association 定义的 IrDA 标准。工具包在多个 运行的模拟器之间模拟红外传输。 您可以使用工具包参数中的 Bluetooth/OBEX 标签来配置蓝牙和 OBEX 环境。其控制了诸如模拟器在模拟的蓝牙环境中试图用多长时间去发现其他设 备,以及最大数据包大小等参数。请参见工具包的用户指南获取更多的详细信息。 2.4 无线开发工具包(WTK): WTK 的全称是 Sun J2ME Wireless Toolkit —— Sun 的无线开发工具包。 这一工具包的设计目的是为了帮助开发人员简化 j2me 的开发过程。使用其中的 工具可以开发与 Java Technology for the Wireless Industry (JTWI, JSR 185) 规范 兼容的设备上运行的 j2me 应用程序。该工具箱包含了完整的生成工具、实用程
序以及设备仿真器。到本文写作时为止可以获取有四个版本,分别是 1.0.4, 2.0, 2.1 和 2.2。每个版本都包括英语,日语,简体中文,繁体中文 4 个语种包。WTK 是 Sun 提供的一个开发工具包。目前各大手机厂商往往把 WTK 经过自身的简化 与改装,推出适合自身产品,如 SonyEricsson,Nokia Developer’s suit 等,都属 于此种类型;而通过 JBuilder, Eclipse 等 IDE,J2ME 开发包工具可以被绑定在这 些集成开发环境中,进一步提高开发效率。 无论哪个版本的 WTK 都会包括以下几个目录: appdb 目录: RMS 数据库信息 apps 目录: WTK 自带的 demo 程序 bin 目录: J2ME 开发工具执行文件 docs 目录: 各种帮助与说明文件 lib 目录: J2ME 程序库,Jar 包与控制文件 session 目录:性能监控保存信息 wtklib 目录: JWTK 主程序与模拟器外观。 2.5 J2me 数字签名: 得到一个证书后就可以对 j2me 的 jad 文件进行签名。这里有一些与签 名相关的需要注意的一些问题。1. 想要安装签过名的软件,就必须通过 jad 来安 装。我们知道 j2me 程序生成后会有 jad 和 jar 两个文件,一般情况下我们只需要 安装 jar 文件就可以了。例如我会将 jar 文件通过蓝牙传到手机上,再进行安装。 但如果想通过手动安装签过名的文件,就要通过 jad 来安装,而且要确保 jad 和 jar 文件是在相同目录下。我的做法是通过数据线将两个文件拷入手机的内存或 存储卡上,然后通过 jad 来安装,这样安装好的软件就是签过名的软件了。不会 再有总是很烦人的询问用户是否允许操作的提示信息。但就我看过的手机看来, 应该是不同的手机有不同的表现。例如索爱的手机关于提示仍然是需要用户自己 设置的。诺基亚也是。只是诺基亚的在使用非签名软件时用户无法设置为“总是 允许”或“只提示一次”。而签了名的就可以设置了。2. 编程人员需要注意,像 很多功能在未签名前是可以使用的,例如 gps,网络连接,文件读写等。3. 签过 名的软件有什么好处。签名就是告诉我们这个软件是可信的,对用户最直接的感 受就是联网或访问手机文件的时候,收发短信,彩信,蓝牙等,但签名后这些功
能就部可用了。这就是 jad 中 MIDlet-Permissions 属性的问题。当未签名时对这 个属性的要求并不严格,但签名后就一定要注意。必须把所要使用到的权限加入 进去,否则这个功能就不能使用了。如下是一些常用的 MIDlet-Permissions 属性。 2.6 本地文件和个人信息: J2ME Wireless Toolkit 支持 JSR 75,即 PDA Optional Packages for the J2ME Platform,它也包括两个独立的 API:FileConnection API 提供了 MIDlet 对设备 上本地文件系统的访问。Personal Information Management (PIM) 可选软件包包 括用于操纵联系人列表、日程安排和计划列表的 API。 一台真实的设备可能有一个能通过使用 FileConnection API 访问的本地文件系 统。在 J2ME Wireless Toolkit 模拟器中,模拟的文件系统作为硬盘上的一个目 录 存 在 。 应 用 程 序 使 用 FileConnection 可 访 问 的 文 件 都 存 放 在 子 目 录 \appdb\\ filesystem 中,此处 是 J2ME Wireless Toolkit 的 安装目录, 是模拟器皮肤的名称。例如,DefaultColorPhone 模拟器皮肤 随 安 装 根 root1 而 产 生 , 包 含 一 个 Readme 文 件 文 件 的 完 整 路 径 为 \appdb\DefaultColorPhone\filesystem\root1\Readme。 您可以从模拟器窗口的菜单种选择 MIDlet > External events 来管理可用的 根目录。您将看到一个添加和删除根目录的小的实用程序窗口。这些操作也将为 registered listener 对象生成事件。 在真实的设备上,个人信息可能以专有格式存储在内存中。模拟器使用硬 盘中的一个目录来存放这些信息,可使用 PIM API 来访问。所有的信息存储在 \appdb\pim 目录中。列表存储在联系人、事件和计划目录的子目录中。 例如,联系人列表 Contacts 位于 \appdb\pim\contacts\Contacts 目录中。 在列表目录内,列表项以 Internet Mail Consortium 指定的标准格式存储。 联系人以 vCard 格式存储,日历和计划项都以 vCalendar 格式存储。 J2ME Wireless Toolkit 2.2 不仅仅是一个出色工具的增量更新。它包括了对 令人激动的四项新规范的支持,同时定义了六种新的 API。随着无线 Java 技术 世界的快速发展,J2ME Wireless Toolkit 紧紧跟随发展的步伐并且包含您所需的 全部工具。
附件 2:外文原文(复印件) Mobile application platform-J2ME profile 1. what is the J2ME J2ME (Java 2 Micro Edition) is a Java 2 as an integral part of it with J2SE, J2EE said. According to Sun's definition: J2ME is a highly optimized Java runtime environment, mainly for consumer electronics devices such as cellular phones and video phones, digital set-top boxes, car navigation systems and so on. J2ME technology in 1999, the JavaOne Developer Conference on the formal launch of the General Assembly, which will of the Java language and platform-independent features into a small electronic device that allows mobile wireless devices sharing between applications. J2ME in its design specifications, to follow a "variety of devices to create a single development system is meaningless" the basic principles. So first of all J2ME embedded devices generally divided into two types: One is the limited computing, power supply is also limited embedded devices (for example, PDA, cell phone); another kind of computing power is relatively better, And in the power supply is relatively sufficient for embedded devices (for example, air conditioners, refrigerators, TV set-top boxes (set-top box)). Because these two types of embedded devices, Java is why the introduction of a concept called Configuration, and then the operation of the above features are limited, limited the power of the device embedded in the definition of Connected Limited Device Configuration (CLDC) specifications are; and the other one To standardize the types of devices are Connected Device
Configuration (CDC) specifications. In other words, J2ME first of all embedded devices using the Configuration concept of separate into two kinds of abstract patterns. In fact, everyone here can be a Configuration for J2ME two types of specifications for embedded devices, which defines the specifications of these devices at least in line with the computing power and capacity of power supply, memory, and other norms Size, as well as set A set of these devices on the implementation of the Java program can be used by the type of library, these norms are defined by the type of library for the Java standard library's core categories and sub-type device features the line The expansion of the library category. For example, on CLDC specifications, can support the core category for the library java.lang .*, java.io. *, java.util .*, and support the expansion of the category for the library java.microedition.io. *. A distinction between the two main Configuration after, J2ME and then in the definition of the concept of a Profile. Profile is a framework in the Configuration on the specifications. The reason why there is the concept of the Profile in order to more clearly separate the various areas of embedded Java devices, as well as how to develop the procedures they should have the function of what. Therefore Profile of the definition of embedded devices are very specific and related to the expansion of the types of libraries, and the Java program embedded in a variety of devices on a user interface that shows how the definition of the Profile is inside. Profile of the expansion of the definition of the type of library is based on the underlying Configuration within the definition of the core categories established by the library. 2. What's New in the J2ME Wireless Toolkit 2.2 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). 2.1 Mobile 3D Graphics: JSR 184, for the Mobile 3D Graphics API 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:Finally, retainedmode shows how to load and render a scene graph file: 2.2 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
分享到:
收藏