jvm stands for "Java Virtual Machine." It is a virtual machine that processes instructions just like a physical processor. But in this Java code has to be converted from a .JAVA file first. which the JVM can understand JVMs are updated from time to time with new features,Java needs a minimum version so that it can run programs.JVM is a software-based machine that is used to run Java programs. It can be installed in any operating system such as Windows, OS X, and Linux&Unix.JVM is a part of JRE, which contains many library functions and other files which can be used as reference for Java programs and we run the programs at jvm.jvm converts byte code into machine code.

How JVM Works

Whenever you run a Java application, the Java compiler converts your code into bytecode, after which JVM it converts the bytecode into machine code.After which the computer CPU is able to extract it directly.Once your Java code is fixed, this code is not configured for the computer but for the JVM, which the JVM converts the bytecode to the machine code.

What are the 3 components of JVM?

  1. ClassLoader Subsystem.
  2. Runtime Data Area.
  3. Execution Engine.

ClassLoader Subsystem

A classloader is a subsystem of java which is used to load class files.Whenever we run a Java program, it is first loaded by the loader.It belongs to a java.lang package.

Java ClassLoader is based on three principles:

  1. Delegation
  2. Visibility
  3. Uniqueness

Types of ClassLoader