Beginner's introduction: J2ME Basic Concept Analysis

Source: Internet
Author: User
Tags definition end functions implement interface range
Concept

J2ME, Java 2 Micro Edition, is a miniature Java platform running on mobile devices by Sun, with mobile devices, PDAs, electronic dictionaries, and a wide range of information terminals such as set-top boxes.

Because of the tens of thousands of mobile terminals and the very different computing power, it is unlikely that just two or three versions of JVMs, like desktop systems, can satisfy Windows,linux and UNIX systems, so J2ME is not a simple miniature version of the JVM. To meet the diverse needs of mobile devices, Sun defines a range of specifications for different types of devices, so the J2ME platform is a collection of many specifications.

The most important mobile terminal is of course the mobile phone, so we mainly discuss mobile phone-related J2ME specifications.

Configuration

Sun divides different devices into CLDC (Connected Limited Device Configuration) and CDC (Connected Device Configuration) in terms of computing power. These two configuration are strictly defined for the hardware and software environment of the device, such as CLDC1.0 defines the memory size as 64-512k, and any device that supports CLDC1.0 must strictly satisfy the definition and cannot have optional or ambiguous functions.

CLDC1.0 is defined for devices with very limited computing power, supports only integer operations and does not support floating-point operations, and most early Java phones support CLDC1.0, such as Nokia 3650,siemens 6688i.

CLDC1.1 adds floating-point operations, so you can use float and double variables on devices that support CLDC1.1. Many Java phones now support CLDC1.1, such as Nokia 9500,siemens S65.

The CDC is designed for more computational power devices, such as PPC, where the CDC JVM is basically close to the desktop JVM, but the package can be used much less than the J2SE package. The very high-end Java phone, which supports the CDC, will soon be on the market.

ProfileCompared with configuration, profile is more about the definition of software interface, profile has to be implemented, there are optional functions, therefore, profile more flexible.

The most important profile is, of course, MIDP (Micro information Device profile), MIDP defines the specification of Java programs that can run on a Java phone, including the application lifecycle, various UI interface components, Support for record storage and HTTP connections, and so on, the MIDP compliant Java applet is called MIDlet and can be downloaded directly to the phone and run via a wireless network.

The early MIDP1.0 specification enabled us to run UI-interface Java programs on our phones, but MIDP1.0 not enough to support the game and had to implement many of its own code, so the MIDP2.0 specification greatly enhanced support for game development, enabling developers to write less code to create games.

The MIDP specification's graphical interface is basically independent of the J2SE AWT and swing components, because the mobile phone's computing power is still relatively limited, but as the phone's CPU is getting faster, so that AWT and swing porting to mobile phones will also be possible, so based on the CDC specification of the latest PBP 1.0 (Personal Basic Profile) and PP 1.0 (Personal profile) provide support for some of the AWT and swing, and currently some high-end PDAs can run PBP and pp Java programs. It is expected that most of the AWT and swing components will be ported to mobile phones in the future.

As mentioned earlier, profile has many optional packages compared to configuration, and the more practical profile also has the Mmapi (Mobile Media API) defined in JSR135, which enables the multimedia playback function; m3g defined in JSR184 API (Mobile 3D Graphics API) to achieve 3D functionality, and JSR120-defined WMA (Wireless Messaging API) for short message dispatch. If your phone supports a profile, such as m3g, you can use the M3G 3D API to implement 3D games in MIDlet.

If you are ready to develop J2ME applications on your mobile phone, you will need to pay attention to the CLDC specification supported by the manufacturer, support MIDP1.0 or 2.0, or support optional packages such as mmapi,m3g,wma.

Although profile defines the Java API interface, but how the bottom of the implementation is determined by the manufacturers themselves, such as m3g defined the 3D interface, but the underlying implementation can either use hardware acceleration, can be simulated by C program, or part of the hardware implementation, part of the software implementation.

The more streamlined Java platform than J2ME is known by Sun as Javacard, running in chips such as credit cards to realize electronic payment functions, and sun has not yet incorporated Javacard into J2ME platform.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.