J2ME, Java 2 Micro Edition, is a micro version of the micro version of the micro version of the mobile device, which is running on the mobile device. It is a common mobile device, and a wide variety of information terminals, etc.
Due to thousands of mobile terminals, and the difference is very large, it is impossible to meet the Windows, Linux and UNIX systems like the desktop system, so J2ME is not a simple micro version. JVM. In order to meet the needs of a thousand different 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 mobile phone, so we mainly discuss the J2ME specification related to mobile phones.
CONFIGURATION
Sun puts different devices into two categories: CLDC (Connected Device Configuration) and CDC (Connected Device Configuration) and CDC (Connected Device Configuration), which is strictly defined for device software and hardware, such as CLDC1.0 defines memory size. For 64-512K, if any device supports CLDC1.0, it must be strictly satisfied, and there is no optional or vague function.
CLDC1.0 is defined for equipment that is very limited computing power, only support integer operations, does not support floating point operations, and most of the early Java mobile phones support CLDC1.0, such as NOKIA 3650, Siemens 6688i.
CLDC1.1 increases floating point operations, so on the device that supports CLDC1.1, the variables of Float and Double types can be used. Many of the current Java phones can support CLDC1.1, such as NOKIA 9500, Siemens S65.
CDC is defined for devices that compare computing power, such as PPC, etc., the JVM of the CDC platform is basically close to the JVM of the desktop, just the package that can be used is much less than the J2SE package. Very high-end Java mobile phone that supports CDC will also be listed soon.
Profile
Compared with Configuration, Profile is more definition for the software interface, and profile has the necessary functions, there is also an optional function, so PROFILE is more flexible.
The most important profile is of course MIDP (Micro Information Device Profile), MIDP defines the specification of the Java program that can run on the Java mobile phone, including the application lifecycle, various UI interface components, support Record storage and HTTP connections, etc. The Java applet consistent with the MIDP specification is called a MIDlet, which can be downloaded directly to the phone through the wireless network and run.
Early MIDP1.0 specification allows us to run a Java program with a UI interface on the mobile phone, but MIDP1.0 supports the game's support, you must implement many of the code yourself, so the MIDP2.0 specification has greatly strengthened support for game development. Make developers to write less code to create games.
The MIDP specification graphical interface is basically independent of J2SE's AWT and SWING components, because the current calculation capacity of mobile phones is still limited, but as the mobile phone's CPU is getting faster, the AWT and SWING are transplanted to the mobile phone will also It is possible, so the latest PBP 1.0 (Personal Basic Profile) and PERSONAL BASIC PROFILE and PERSONAL PROFILE and PERSONAL PROFILE are provided, and some high-end PDAs have been able to run the Java programs for PBP and PP. It is foreseeable that most of the AWT and SWING components in the future can be ported to your phone. As mentioned earlier, compared with Configuration, profile has many optional packages, compared to the MMAPI (Mobile Media API) defined in JSR135, implementing multimedia playback; M3G API defined in JSR184 (Mobile 3D Graphics API) ), Implement 3D function; in the WMA (Wireless Messaging API) defined by JSR120, a short message occurrence. If your phone supports a profile, such as M3G, you can use M3G 3D API to implement 3D games in MIDLET. If you are ready to develop J2ME applications on your mobile phone, you need to pay attention to the CLDC specification supported by the manufacturer when you select your phone, support MIDP1.0 or 2.0, whether MMAPI, M3G, WMA, etc. can be supported.
Although PROFILE defines the Java API interface, how the bottom layer is implemented by each manufacturer, as M3G defines a 3D interface, but the underlying implementation can be used either hardware acceleration or by the C program, or partially implemented, partially Implemented by software.
The Java platform than J2ME is called Javacard by SUN, running in chips such as credit card, implementing electronic payment, etc., the current Sun has not incorporated Javacard into the J2ME platform.