Uncover the mystery of J2ME platform

zhaozj2021-02-16  44

Programmers who do J2ME applications may often be confused by some nouns or concepts, such as the relationship between Personal Basic PROFILE and Personal PROFILE? CLDC-based applications can be transferred to CDC-based devices without modification? To answer these questions is not easy, because you must first uncover the mystery of the J2ME platform.

In 2000, when the CLDC of the J2ME platform was released, all Java developers were excited. Sun also looked forward to the CLDC-based MIDP after two months, providing developers with platforms for developing interactive applications. I think it is mainly based on CLDC / MIDP based on CLDC / MIDP. Another specification of the J2ME platform is released after about 10 months, and also has a Foundation Profile. However, since they have not given the developer to develop an API that can be interactive, they have the impact of their impact far less than the release of CLDC / MIDP. Probably in 2003, Sun released CDC-based Personal Basic Profile and Personal Profile. Their combination replaces the previous Personaljava platform.

Is it already confused by these names, we now come to see the structure of the J2ME platform. The J2ME platform is designed in conjunction with Configuration and Profile. Configuration is the smallest platform to support the maximum range of equipment. Profile provides a corresponding development package collection for specific devices. Two basic configuration CDCs and CLDCs in J2ME are distinguished in accordance with the following criteria. CLDC:

512 KB below Memory Finite Energy Supply (usually used battery) limited or non-continuous network connection simple user interface 16 or 32-bit processor CDC:

2m or more memory has a network connection capability, usually a wireless network needs to implement a full function of the Java virtual machine specification from the above-mentioned requirements. We are not difficult to see that CLDC is mainly for those resources that are very limited, such as mobile phones. Such as mobile phones , PDA, duplex paging machine, etc. CDC is mainly facing those home appliances, such as set-top boxes, car navigation systems, etc. Let's take a look at the structure of the J2ME platform:

We can see that the core of J2ME is Configuration, which defines Java virtual machines in it, dealing with the bottom Host OS. PROFILE provides the ability to access the IO or graphical interface of the device, so configure and profile constitute a J2ME's operating environment. For example, CLCD / MIDP can provide you to develop a mobile phone program. Different optional development kits can also be provided on the Profile for different devices. Since the CLDC / MIDP is more familiar, we will introduce the CDC-based J2ME system architecture, and it is also a system map: CDC-based equipment to support all Java2 language norms and Java virtual machine specification, it is CLDC The supercharge and far greater than CLDC, so the CLDC-based program is a CDC-based device that can be transplanted without modification. Foundation profile is a Profile that extends to the CDC, but he does not provide the GUI development package, and the GUI is defined in the Personal Basic PROFILE, which provides a subset of AW to developers. It also provides Xlet application mode - for Java TV. Personal Profile is a supercoming of Personal Basci Profile. He provided support for Applet, enriched AWT components, added Java.awt.DataTransfer packages. Summary: The above is the elaboration of the J2ME platform, I think the most important thing is the design of Configuration / Profile. It is understood that it will master half. If you have different opinions, welcome to communicate together!

转载请注明原文地址:https://www.9cbs.com/read-20457.html

New Post(0)