JVM(Java virtual machine) and Java environment

JVM(Java Virtual Machine)

The Java virtual machine functions as an interpreter. That is, the JVM exists in the memory space and reads and executes the bytecode of the class file(source code) that compiles the code written in Java.

The JVM is in the form of a sandbox and it is not possible to run external programs in the protected area. In other words, the JVM maintains security in a way that prevents the system from being tampered with.

hotspot jvm architecture
Hotspot JVM Architecture

The JVM is divided into a class loader, a runtime data area, and an execution engine.

The class loader reads the bytecode class file and places the bytecode and data in the execution data area. The Just-in-time(JIT) compiler in the execution engine is then executed.

If necessary, the garbage collector is run to clean up the memory of the heap.

The JIT compiler uses a compilation technique that translates the program into machine language at the point of actual execution. This technique is used to speed up program execution.

The garbage collector in the execution engine is closely related to the heap area of memory.

hotspot heap structure
Hotspot Heap Structure

All newly created objects in the heap area are first assigned to the Young Generation area. If the program continues to run after this area is filled, it performs Minor Garbage Collection to remove unreferenced objects. At this time, all the jobs enter the suspended state and the remaining objects are moved to the Old Generation area even after Minor Garbage Collection is performed. Major garbage collection is performed in this area, and unreferenced objects are removed.

Types of Java VM

There are many other types of Java Virtual Machine (JVM) other than those provided by Oracle.

  • HotSpot

    The most widely used JVM provided by Oracle was originally developed by Sun Microsystems. However, Sun Microsystems has been acquired by Oracle and continues to develop at Oracle.

  • JRockit

    It is a JVM provided by Oracle. It was originally developed by Appeal Virtual Machines, BEA Systems, but it was acquired by Oracle and continued to be developed at Oracle. However, since Java SE 8, key features such as Mission Control have been integrated into the HotSpot, stopping development.


    It is a JVM developed by IBM and is used as a standard VM for IBM’s WebSphere products and DB2 products.


    The JVM developed by Hewlett-Packard is used as the standard VM for Hewlett-Packard’s HP-UX system.

  • Zing

    The JVM developed by Azul Systems shows excellent performance for processing large amounts of memory.

  • OpenJDK

    The open source version of Java SE is installed by default on major Linux distributions.

JRE(Java Runtime Environment)

JRE refers to the execution environment of a Java application. It can be run using modules (such as JAR files and class files) of already compiled Java applications.

JDK(Java Development Kit)

Refers to the development environment for Java applications, and includes tools for developing Java applications such as compilers and debuggers for source files as well as execution environments.

jdk structure
JDK Structure

Share This Post

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

Latest Post