Java JDK, JRE and JVM

 What is JVM?

JVM (Java Virtual Machine) is an abstract machine that allows your computer to run a Java program.

When you run the Java program, the Java compiler first compiles your Java code into bytecode. Then, the JVM translates the bytecode into native machine code (a set of instructions that a computer's processor executes directly).

Java is a platform independent language. This is because when you write Java code, it is ultimately written for JVM but not for your physical machine (computer). Because JVM runs Java bytecode which is platform independent, Java is platform independent.

How does Java program work?

Working of Java Program

What is JRE?

JRE (Java Runtime Environment) is a software package that provides Java class libraries, a Java Virtual Machine (JVM), and other components required to run Java applications.

JRE is the superset of JVM.

JRE contains JVM and other Java class libraries.
Java Runtime Environment

If you need to run Java programs, but not develop them, JRE is what you need.

What is JDK?

JDK (Java Development Kit) is a software development kit needed to develop applications in Java. When you download JDK, JRE is also downloaded with.

In addition to JRE, JDK also contains a number of development tools (compilers, JavaDoc, Java Debugger, etc.).

JDK contains JRE and other tools to develop Java applications.
Java Development Kit

Relationship between JVM, JRE and JDK.

JRE contains JVM and class libraries and JDK contains JRE, compilers, debuggers, and JavaDoc
Relationship between JVM, JRE, and JDK

Comments

Most View Post

Java Data Types (Primitive)

Java Introduction

Java operators

Java Basic Input and Output

Java Expressions, Statements and Blocks