Broadly speaking, as long as the Java bytecode can be executed, it can be called the Java platform (Java platform). In general, there are three ways to implement the Java platform, respectively:
Java Virtual machine (Java MACHINE,JVM)
Java operating System (Java operating system)
Java Chip (Java Chip)
The following three Java platforms are presented and compared.
Java Virtual Machine
The so-called Java Virtual Machine refers to a program executed on the operating system that interprets the Java bytecode and executes Java bytecode with the help of the operating system. Such an implementation structure can be broadly divided into four tiers, namely:
First layer (top) Java bytecode
Second-tier Java virtual machines
Third-tier operating system
Layer fourth (bottom) chip
The chip executes the above operating system, the operating system executes the Java virtual machine above, and the Java virtual machine executes the Java bytecode above. For Java bytecode, it only touches the Java virtual machine, so of course "mistakenly think"java virtual machine is its platform. "
Example: Pentium III Chip + Windows OS + Sun HotSpot Client VM + Together/java application.
Java Operating System
If you integrate Java virtual machines into existing operating systems (for example, Mac OS X), or create a new operating system that specializes in Java bytecode (for example, JOS), this type of operating system that can directly execute Java bytecode is also seen as a Java platform. Such an implementation structure can be broadly divided into three tiers, namely:
First layer (top) Java bytecode
Second-tier Java operating system
The third layer (bottom) of the chip
Java Chip
If you combine the Java operating system with existing chips into a new set of chips (for example, ARM 7, arm 9), or create a new Java-specific chip (for example: Ajile aJ-100), then this kind of chip is also a Java platform. Such an implementation structure can be divided into two tiers, namely:
First layer (top) Java bytecode
Second layer (bottom) Java chip
Three different ways of comparison
These three are Java platform, each has advantages and disadvantages, it is difficult to say that one way is better, must see your needs and depends.
Implementing Java through virtual machines is the most common architectural approach, partly because the Java platform for virtual machines is easiest to implement (compared to the Java operating system and Java chips), and two is because as long as there is a virtual machine, there is no change to the physical platform (operating system and CPU), the function of executing Java programs is much more. Currently, most mainstream entity platforms (including Windows, Linux, Mac, Solaris, PalmOS, EPOC ...). ) already have a Java virtual machine.
The architecture of virtual machines is, of course, less efficient because of the hierarchy, which is the most critical part of the virtual machine architecture. But since the technology of virtual machines has been progressing, the efficiency of implementation has been continuously improved. The architecture of the Java operating system is already pretty close, so the virtual machine approach should continue to be the mainstream of the Java platform on the PC.
In general, the Java operating system to perform Java bytecode, more efficient than the way the virtual machine. So the Java virtual machine is integrated into the operating system to enhance the added value of the operating system, which may become a trend (e.g. MacOS X integrates Java and the operating system nicely). But if you design a new operating system that can only execute Java, it may not be easy to succeed, because the new operating system is bound to be plagued by the device of driver (driver) deficiencies. For this reason, coupled with the fact that the Java platform for the operating system is not as efficient as expected than the Java platform for virtual machines, the pure Java operating system "javaos" project between IBM and Sun has stalled.
Using the chip to implement the Java platform, the implementation of the Java program will have a great increase in speed, after all, hardware faster than the software many. This approach will later become the mainstream of embedded systems, and many Java IA products (e.g., Set-top Box) will start using Java chips. But this way has turned the whole Java into a hardware platform, not suitable to be called cross-platform.
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.