Java program running mechanism and running process

Source: Internet
Author: User
Tags virtual environment

Two core mechanisms: Java Virtual machine, garbage collection mechanism.

Java program running process: source files-Through the Java compiler-generated bytecode file class file---Class loader-bytecode Checker---Interpreter-operating system platform,
On the operating system, there is a set of environment for compiling and executing Java---then handing it over to the operating system platform---then translating it into a part that the machine can recognize.
The upper layer of the operating system also has an environment that is compiled and executed for Java, a virtual machine called java. A virtual machine, the Java Virtual machine can be understood as a byte-code machine instruction CPU.
For different platforms, there are different virtual machines
The Java Virtual machine mechanism masks the differences of the underlying platform, enabling a single compilation and running Anywhere

Java files---compiled--CALSS files---executed on different platforms of Java virtual machines
For Java to see the bottom of the operating system, but in the virtual environment to execute

Compiling and Interpreting:
Compilation: C and C + + can be compiled directly into the format of executable files that the operating system can recognize.
Java was first compiled into Java's own executable file. class, when the real class file is in the process of executing, he needs the Java virtual machine to take out the class
The code to one line of explanation, take a line I will translate him into the operating system platform can directly understand the format of the executable file, so, the real implementation process, Java is
A row of rows explains the execution of the

Garbage collection mechanism, every time, the unified garbage collection once

JDK Java Software Development Kit
The JRE Java Runtime Environment contains the JRE, which is the virtual machine

Java program running mechanism and running process

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.