HakiDocs
Java

JVM

Java Virtual Machine

The JVM is an abstract
computing machine.
that enables a computer
to run a Java program.

It is the core component
of the Java Runtime Environment (JRE).

It takes the platform-independent
bytecode from the
java compiler
and translates it
into the native machine code.
of the specific hardware/OS it is running on.

The JVM is tailored for each operating system
(e.g., a Windows JVM, a Linux JVM).
This allows the same bytecode to run
on any machine,
as long as that machine has the.
correct JVM implementation.

JVM as an operating room

Imagine the Java Virtual Machine (JVM) is a universal, self-contained operating room 🏥 that exists inside any computer (Windows, Mac, Linux, etc.).

It uses tools such as
the Garbage Collector
for cleaning up objects that
are no longer needed.

In relation with
Compiler VS Runtime Error ,
the JVM may raise an exception
while executing the code.
Producing an unchecked
exception such as NullPointerException.

Resources

On this page