Home >Java >javaTutorial >Detailed introduction to JAVA Virtual Machine (JVM) (1) - Overview of JVM

Detailed introduction to JAVA Virtual Machine (JVM) (1) - Overview of JVM

王林
王林forward
2019-08-24 11:28:353042browse

Detailed introduction to JAVA Virtual Machine (JVM) (1) - Overview of JVM

First, explain the above four parts.

(1) Automatic memory management talks about the part in the Java runtime data area, which is divided into memory partitioning and garbage collector.

(2) The execution subsystem talks about the three parts circled in red: class file structure, class loading mechanism, and bytecode execution engine.

(3) Optimization is compile-time optimization and run-time optimization respectively.

(4) Concurrency talks about how virtual machines implement multi-threading.

The details can be seen in conjunction with the JVM structure diagram below. This picture is based on JDK7. Before JDK7, the constant pool was stored in the method area. Since JDK7, the constant pool has been placed on the heap.

Detailed introduction to JAVA Virtual Machine (JVM) (1) - Overview of JVM

This series of articles:

JVM (1)—Overview

JVM (2)—Division of memory

JVM (3)—Garbage collection mechanism

JVM (4)—Class file structure

##JVM (5)—Class loading mechanism

JVM (6 )—Execution Engine

JVM (7)—JVM Optimization

JVM (8)—Efficient Concurrency

JVM concept:

Let’s take a look at what JVM is and why there is JVM.

JVM is a Java Virtual Machine (Java Virtual Machine), which implements the function of "compile once, run anywhere". If there is no JVM, when we write java code, if we want to run it on the Windows platform, we need to write a set of programs suitable for the Windows platform. If you want to run on the linux platform, write a linux one.

Detailed introduction to JAVA Virtual Machine (JVM) (1) - Overview of JVM

If the analogy is to reality, .java is flour, .class is the mixed dough, and jvm is each mold, which depicts the same dough into different shapes. Steamed bun.

For more related questions, please visit the PHP Chinese website:

JAVA practical teaching video

The above is the detailed content of Detailed introduction to JAVA Virtual Machine (JVM) (1) - Overview of JVM. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete