Author: Wang Sen Taiwan Jiaotong University Institute of Technology Management moli.mt88g@nctu.edu.tw█ Preface:
I believe that in the previous period Run! PC, I have seen the author's article, and the application on Java on hand-held devices (such as: Palm) or action devices (such as motorola mobile phones) should have a certain degree of understanding. However, the so-called "see the mountain is not the mountain, see the water is not water", although I have already told you how to write a Java program in these devices before the author, but CLDC is what? MIDP is also a thing • I believe that many people must have a lot of questions in their heads. If you look at the JavaSoft website to check the information about Java 2 Micro Edition, the ten eight9 will be made by a large pile of technical nouns. Shi KVM, Shi CLDC, CDC, MIDP, 喔, then taken the Nouns and JES, and JES after Personal Java, Embedded Java, and JES. Although it is a mini version of Java, it is really not small, enough to make eye. Indeed, when the author just started to contact Java 2 Micro Edition, I feel that this thing is, the more it is, the more people don't touch. Even if everyone has understood how to write programs for Java 2 Micro Edition, the author still believes that there is a giant understanding of Java 2 Micro Edition will have a lot of help. Therefore, this article will be returned to the world, bring everyone to see the world of Java 2 Micro Edition from the perspective of the giant view. I hope that after reading this article, you can make everyone experience "see the mountain is the mountain, see water is water", all suddenly feels cheerful. First, we must first understand the positioning of Java 2 Micro Edition in the entire Java technology. ■ Positioning of various Java versions
People who use Java writing programs know that there is a group of so-called core categories (Core Class, Java. *), There is a so-called expansion class, ie, javax *) in the core category. According to the support of these two categories, four different Java versions are distinguished, as shown below:
The above figure is only the range of core categories supported by various Java versions, and cannot be described for additional expansion classes supported by these versions. In addition, this figure also illustrates the range of Java basic types supported by these versions (Primitive Type, Bool, Byte, Double, INT, INT, LONG, FLOAT, DOUBLE) range. The more the center of the concentric circle, the more complete the core category. Conversely, the Java version of the concentric circle is just a subset of core categories, and the more, the smaller the core category of the support. Similarly, the more complete, the supported Java is more complete, and the more supported Java is basically the basic type of Java in the concentric circle.
To understand this picture, we must use Java 2 Standard Edition (J2SE) as a baseline, this version has implemented the core category defined in all Java standard specifications, and also supports all Java basic models. J2SE is positioned on the application of the client program. Extending from J2SE, its outer concentric circle is Java 2 Enterprise Edition (J2EE), in addition to supporting all standard core categories, but also adds many expansion categories that support internal use, compared to support servlet / JSP Javax The .Servlet. * Category, support Enterprise Java Bean's javax.ejb. * category. Of course, J2EE must support all Java basic models. J2EE is positioned on the server-side program. From J2SE, you will first see Java 2 Micro Edition (J2ME), which is supported by only the core category of core categories, which is only supported in Java.lang. *, Java.io. *, And java.util. * These categories. This version also adds some expansion categories that support "minute devices", such as javax.microedition.io. * Category. However, this version does not support all Java basic models, and the standard J2ME CLDC reference is implemented, that is, KVM (K Virtual Machine) executed on Palmos, it does not support floating point numbers (Float , Double) Java basic model. J2ME is positioned in an embedded system.
In the most inside of the concentric circle, there is a Java's Smart Card version. This part is not as defined in the Java file, but the author understands all Java versions, it is reasonable to draw it inside the J2ME. Because the Smart Card version only supports java.lang. * This core category is less than the core category supported by J2Me, but it also belongs to its own expansion category, such as Javacard. *, Javacardx. * These categories. The Smart Card version only supports Boolean and Byte these two Java basic models. Just as its name, this version is located on the application of Smart Card.
Among the above Java versions, there are your own virtual machine (VM) to achieve the ultimate goal of "Write Once, Run Anywhere". There is a Card VM on the Smart Card, which is responsible for downloading a Card applet on the Smart Card; in the world of J2ME, its standard reference is implemented - KVM, used to perform spotlet or midlet on the embedded device; in J2SE In J2EE, Classic VM and HotSpot VM are responsible for performing Java Applet, Java Servlet, or Java Application.
Hotspot VM is a new generation of JVM, compared to Classic VM is a traditional JVM. According to JavaSoft, Hotspot VM makes the Java program's execution efficiency improved. In fact, HotSpot VM is also divided into the client version with the Server version. Why is it to distinguish between these two? In fact, it is mainly because the application executed on the client and the application executive on the server is different in the basic demand. The client application pays more attention to the beautiful and user interface. The sensitivity; the application executing on the server is more than the need on the screen, so the two versions of the HotSpot VM are the result of optimization to different needs.