Java and JVM operating principles reveal

Source: Internet
Author: User

Here is a simple way to share the Java and JVM operating principles, the Java language written by the Java compiler, the source program compiled into a platform-independent ' bytecode program ' (. class file, that is, 0, 12 binary), and then in the Java interpreter above the OS to explain the execution, While the JVM is the core and foundation of Java, the virtual processor between the Java compiler and the OS platform.

The process of 1.Java language operation

The Java-language source program is compiled by the Java compiler into a platform-independent ' bytecode program ' (. class file, which is the 0, 12-based program), and then interpreted in the Java interpreter above the OS.

Note: The JVM (Java Virtual machine) includes the interpreter, the different JDK VMs are the same, and the interpreter is different.

2.JVM:

The JVM is the core and foundation of Java, the virtual processor between the Java compiler and the OS platform. It is a software method to implement the abstract of the computer based on the underlying operating system and hardware platform, you can execute Java bytecode program.

The Java compiler generates code or bytecode files that the JVM can understand as long as it is oriented to the JVM. The Java source file is compiled into a bytecode program that translates each instruction into a different platform machine code through the JVM, running through a specific platform.

The process by which the JVM executes the program:

I. Loading A. class file

II. Manage and Allocate memory

III. Performing garbage collection

JRE (Java Runtime Environment) the running environment of Java programs constructed by the JVM

Java and JVM operating principles reveal

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.