Three ways to implement the Java platform
Widely, as long as the Java Bytecode is executing Java Bytecode, Java Platform can be called. In general, there are three ways to realize the Java platform, namely:
Java Virtual Machine (Java Virtual Machine, JVM)
Java operating system (Java Operating System)
Java Chip (Java Chip)
The following three Java platforms are as follows and compared.
Java virtual machine
The so-called Java virtual machine refers to a program executed on the operating system. This program can interpret Java Bytecode and execute Java Bytecode with the help of the operating system. Such an implementation architecture can be generally divided into four layers, namely:
First layer (uppermost layer) Java bytecode
Second layer Java virtual machine
Third layer operating system
Fourth layer (bottom) chip
The chip performs the above operating system, the operating system performs the Java virtual machine above, and the Java virtual machine performs the above Java Bytecode. For Java Bytecode, it only contacts Java virtual machines, so of course, "Mislee" Java virtual machine is its platform.
Example: Pentium III Chip Windows 2000 OS Sun Hotspot Client VM TOGETHER / JAVA Application.
Java operating system
If Java virtual machine is integrated into existing operating systems (for example: Mac OS X), or create a new operating system to perform Java Bytecode (for example,: JOS), this type can directly execute Java Bytecode operating system It can be seen as a Java platform. Such an enforcement architecture can be generally divided into three layers, namely:
First layer (uppermost layer) Java bytecode
Second layer Java operating system
Third layer (bottom) chip
Java chip
If the Java operating system and the existing chip are integrated into a set of new chips (eg, ARM 7, ARM 9), or create a new Java specialty chip (for example: ajile aj-100) then this kind of chip It is also a Java platform. Such an enforcement architecture can be substantially divided into two layers, namely:
First layer (uppermost layer) Java bytecode
Layer 2 (bottom) JAVA chip
Comparison of three ways
These three are the Java platform, each has advantages and disadvantages, it is difficult to say that it is better, you must see your needs.
Performing Java through a virtual machine is the most common schema method, on the one hand, because the virtual machine's Java platform is most prone to substantive (compared to the Java operating system and Java chip), the second aspect is because of virtual The machine can make the function of executing the Java program in the case where the unfained entity platform (operating system and CPU) is not more. At present, most mainstream physical platforms (including Windows, Linux, Mac, Solaris, Palmos, EPOC ...) have Java virtual machines. The field of virtual machines is divided by too many levels, so it will be poor in efficiency, which is the most critted place for virtual machine architecture. However, since the technology of the virtual machine has been progressing, the execution efficiency has always been continuous. At present, the architecture of the Java operating system is currently equivalent, so the way the virtual machine should continue to be mainstream of the Java platform on the PC.
In general, Java Bytecode is performed through the Java operating system, the efficiency is better than the virtual machine. So the Java virtual machine is integrated into the operating system to enhance the additional value of the operating system, which may become a trend (such as Macos X, a good integration of Java and operating systems). But if you design a new operating system that can only perform Java, it may not be easy to succeed, because the new operating system is bound to face the DEVICE DRIVER's insufficient troubles. Because of this reason, coupled with the Java platform that fact proves that the operating system is more efficient than the virtual machine is more efficient than expected, so the pure Java operating system "Javaos" plans in IBM and Sun works.
With the way of using chips, the Java platform is implemented, and there is a big improvement in the execution speed of the Java program. After all the hardware is much faster than the software. This approach will become the mainstream of the embedded system, and many Java IA products (such as SET-TOP BOX) begin to use Java chips. However, this way has turned Java into a hardware platform, and it is not suitable as cross-platform.