How to understand the cross-platform features of Java

Source: Internet
Author: User

1, Java cross-platform, refers to Java at runtime is above the OS, is running in the JVM, and the OS is not directly linked.

2, Java cross-platform is mainly determined by the Java compilation method, because Java is compiled and executed by the JVM, it compiles the. class file is the underlying implementation is not for the operating system, so what operating system does not affect the implementation of Java code.

3. To run a Java program, you must install the JDK (Java Development Kit), different systems need to have different JDK. Since there is a JVM (virtual machine) inside the JDK, it is possible to convert our original files into machine language that the machine can eventually recognize. Virtual machine It is actually a simulation machine that is realized by means of the device and other functions of the computer itself.

4. How does a virtual machine turn our original file into a machine-readable language?

First, we write the source program (extension. java), the virtual machine through the JDK "Javac.exe" This program, you can convert our source program into a Java Word decoder (extension. Class).

Secondly, after the conversion to the self-decoding program, through the "Java.exe" program, the self-decoding program can be implemented under the corresponding operating system Java self-decoding interpretation. The machine-readable language is implemented through the operating system.

It is important to note that not all systems are capable of running Java. Because if the Java self-decoder is not installed on this operating system, then the Java language cannot be run on this platform.

How to understand the cross-platform features of Java

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.