计算机专业毕业设计(论文)外文翻译J2ME导学.doc
《计算机专业毕业设计(论文)外文翻译J2ME导学.doc》由会员分享,可在线阅读,更多相关《计算机专业毕业设计(论文)外文翻译J2ME导学.doc(13页珍藏版)》请在三一办公上搜索。
1、英文原文J2ME step by stepJ2me overviewIntroductionThis section will get you started using J2ME. Well begin by defining J2ME, then well discuss its general architecture and learn about the devices J2ME targets. As part of the architecture discussion, we will provide an overview about profiles and configu
2、rations. (Well address the details of both profiles and configurations in later sections.) We also will cover briefly some considerations for packaging and deploying J2ME applications. What is J2ME?Sun Microsystems defines J2ME as a highly optimized Java run-time environment targeting a wide range o
3、f consumer products, including pagers, cellular phones, screen-phones, digital set-top boxes and car navigation systems. Announced in June 1999 at the JavaOne Developer Conference, J2ME brings the cross-platform functionality of the Java language to smaller devices, allowing mobile wireless devices
4、to share applications. With J2ME, Sun has adapted the Java platform for consumer products that incorporate or are based on small computing devices. General J2ME architectureJ2ME uses configurations and profiles to customize the Java Runtime Environment (JRE). As a complete JRE, J2ME is comprised of
5、a configuration, which determines the JVM used, and a profile, which defines the application by adding domain-specific classes. The configuration defines the basic run-time environment as a set of core classes and a specific JVM that run on specific types of devices.The profile defines the applicati
6、on; specifically, it adds domain-specific classes to the J2ME configuration to define certain uses for devices. The following graphic depicts the relationship between the different virtual machines, configurations, and profiles. It also draws a parallel with the J2SE API and its Java virtual machine
7、. While the J2SE virtual machine is generally referred to as a JVM, the J2ME virtual machines, KVM and CVM, are subsets of JVM. Both KVM and CVM can be thought of as a kind of Java virtual machine - its just that they are shrunken versions of the J2SE JVM and are specific to J2ME.Configurations over
8、viewThe configuration defines the basic run-time environment as a set of core classes and a specific JVM that run on specific types of devices. Currently, two configurations exist for J2ME, though others may be defined in the future: Connected Limited Device Configuration (CLDC) is used specifically
9、 with the KVM for 16-bit or 32-bit devices with limited amounts of memory. This is the configuration (and the virtual machine) used for developing small J2ME applications. Its size limitations make CLDC more interesting and challenging (from a development point of view) than CDC. CLDC is also the co
10、nfiguration that we will use for developing our drawing tool application. An example of a small wireless device running small applications is a Palm hand-held computer. Connected Device Configuration (CDC) is used with the C virtual machine (CVM) and is used for 32-bit architectures requiring more t
11、han 2 MB of memory. An example of such a device is a Net TV box. CDC is outside scope of this tutorial.Profiles overviewThe profile defines the type of devices supported by your application. Specifically, it adds domain-specific classes to the J2ME configuration to define certain uses for devices. P
12、rofiles are built on top of configurations. Two profiles have been defined for J2ME and are built on CLDC: KJava and Mobile Information Device Profile (MIDP). These profiles are geared toward smaller devices. A skeleton profile on which you create your own profile, the Foundation Profile, is availab
13、le for CDC. However, for this tutorial, we will focus only on profiles built on top of CLDC for smaller devices. We will discuss both of these profiles in later sections and will build some sample applications using KJava and MIDP. Devices J2ME targetsTarget devices for J2ME applications developed u
14、sing CLDC generally have the following characteristics: 160 to 512 kilobytes of total memory available for the Java platform Limited power, often battery powered Network connectivity, often with a wireless, inconsistent connection and with limited bandwidth User interfaces with varying degrees of so
15、phistication; sometimes with no interface at allSome devices supported by CLDC include wireless phones, pagers, mainstream personal digital assistants (PDAs), and small retail payment terminals. According to Sun Microsystems, target devices for CDC generally have the following characteristics: Power
16、ed by a 32-bit processor Two megabytes or more of total memory available for the Java platform Devices that require the full functionality of the Java 2 Blue Book virtual machine Network connectivity, often with a wireless, inconsistent connection and with limited bandwidth User interfaces with vary
17、ing degrees of sophistication; sometimes with no interface Some devices supported by CDC include residential gateways, smartphones and communicators, PDAs, organizers, home appliances, point-of-sale terminals, and car navigation systems. Developing j2me applicationsIntroductionIn this section, we wi
18、ll go over some considerations you need to keep in mind when developing applications for smaller devices. Well take a look at the way the compiler is invoked when using J2SE to compile J2ME applications. Finally, well explore packaging and deployment and the role preverification plays in this proces
19、s. Design considerations for small devicesDeveloping applications for small devices requires you to keep certain strategies in mind during the design phase. It is best to strategically design an application for a small device before you begin coding. Correcting the code because you failed to conside
20、r all of the gotchas before developing the application can be a painful process. Here are some design strategies to consider: Keep it simple. Remove unnecessary features, possibly making those features a separate, secondary application. Smaller is better. This consideration should be a no brainer fo
21、r all developers. Smaller applications use less memory on the device and require shorter installation times. Consider packaging your Java applications as compressed Java Archive (jar) files. Minimize run-time memory use. To minimize the amount of memory used at run time, use scalar types in place of
22、 object types. Also, do not depend on the garbage collector. You should manage the memory efficiently yourself by setting object references to null when you are finished with them. Another way to reduce run-time memory is to use lazy instantiation, only allocating objects on an as-needed basis. Othe
23、r ways of reducing overall and peak memory use on small devices are to release resources quickly, reuse objects, and avoid exceptions.Performance considerationsCode for performance. Here are some ways to code with the aim to achieve the best performance: Use local variables. It is quicker to access
24、local variables than to access class members. Avoid string concatenation. String concatenation decreases performance and can increase the applications peak memory usage. Use threads and avoid synchronization. Any operation that takes more than 1/10 of a second to run requires a separate thread. Avoi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机专业 毕业设计 论文 外文 翻译 J2ME
链接地址:https://www.31ppt.com/p-3992528.html