Three methods for implementing the Java platform

Source: Internet
Author: User
Three methods for implementing the Java platform-general Linux technology-Linux programming and kernel information. The following is a detailed description. Broadly speaking, anyone who can execute Java bytecode can be called a Java platform ). Generally, there are three methods to implement the Java platform:

◆ Java Virtual Machine (JVM)

◆ Java Operating System)

◆ Java Chip)

The following three Java platforms are explained and compared.

Java VM

The so-called Java VM is 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 execution architecture can be divided into four layers:

Java bytecode of the first layer (the top layer)

Level 2 Java VM

Level 3 Operating System

Layer-4 (bottom layer) chips

The chip executes the above operating system, the operating system executes the above Java Vm, And the Java VM executes the above Java bytecode. For Java bytecode, it only comes into contact with the Java virtual machine, so of course, "mistaken" Java Virtual Machine is its platform.

Instance: Pentium III Chip + Windows 2000 OS + Sun HotSpot Client VM + Together/Java pplication.

Java operating system

If you integrate the Java VM into an existing operating system (such as Mac OS X), or create a new operating system to specifically execute Java bytecode (such as JOS ), this type of operating system that can directly execute Java bytecode can also be considered as a Java platform. Such an execution architecture can be divided into three layers:

Java bytecode of the first layer (the top layer)

Level 2 Java operating system

Layer 3 (bottom layer) chips

Java chip

If the Java operating system and existing chips are integrated into a new set of chips (for example, ARM 7 and ARM 9), or a new Java dedicated chip (for example: aJile aJ-100) So this kind of chip is also a Java platform. Such an execution architecture can be divided into two layers:

Java bytecode of the first layer (the top layer)

Layer 2 (bottom layer) Java chip

Comparison of the three methods

These three are both Java platforms with their respective advantages and disadvantages. It is hard to say that this method is better, but it depends on your needs.

Using virtual machines to execute Java is the most common architecture. On the one hand, it is because the Java platform of virtual machines is most easily implemented (compared with the Java operating system and Java chip ), the second reason is that with virtual machines, the Java program can be executed without changing the physical platform (operating system and CPU. Currently, most mainstream physical platforms (including Windows, Linux, Mac, Solaris, PalmOS, and EPOC...) already have Java virtual machines.

Because the architecture of virtual machines is divided into too many layers, the efficiency will certainly be relatively poor, which is the most popular part of the virtual machine architecture. However, as the technology of virtual machines has been improving, the execution efficiency has been continuously improved. At present, the architecture of the Java operating system is approaching, so the virtual machine method should continue to become the mainstream Java platform on the PC.

Generally, the efficiency of executing Java bytecode through the Java operating system is better than that of virtual machines. Therefore, the Java Virtual Machine (VM) is integrated into the operating system to increase the additional value of the operating system, this approach may become a trend (for example, MacOS X integrates Java and the operating system well ). However, 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 face serious troubles due to insufficient driver. For this reason, it turns out that the Java platform of the operating system is much less efficient than the Java platform of the virtual machine, therefore, the pure Java operating system "JavaOS" plan for IBM and Sun has been suspended.

Using chips to implement the Java platform greatly improves the execution speed of Java programs. After all, the hardware speed is much faster than that of software. This method will become the mainstream of embedded systems. Many Java IA products (such as Set-Top Box) will start to use Java chips. However, this method has turned Java into a hardware platform and is not suitable for cross-platform access.
Related Article

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.