Site icon DataFlair

Difference Between JDK vs JRE vs JVM

Free Java courses with 37 real-time projects - Learn Java

1. Objective

In this Java tutorial, we are going to study What is JDK (Java Development Kit), JRE (Java Runtime Environment) or Java RTE, and JVM (Java Virtual Machine). Moreover, we will discuss the differences between JDK vs JRE vs JVM. At last, we see some functions of JDK and JRE and JVM.

So, let us start the Difference between JDK, JRE, and JVM.

JDK vs JRE vs JVM

2. Introduction to JDK vs JRE vs JVM

Here, we will discuss the introduction to JDK vs JRE vs JVM.

a. What is the Java Development Kit (JDK)?

The JDK stands for Java Development Kit used for developing Java applets and apps, it is basically a software development environment. JDK includes Java Runtime Environment (JRE) which happens to be a loader/interpreter, a compiler called (javac), a document generator (Javadoc), an archiver (jar), and other tools required in development.

Do you know What is Design Patterns in Java?

b. What is the Java Runtime Environment (JRE)?

Java Runtime Environment or JRE is also known as Java RTE. Java Runtime Environment contains core classes and supporting files, it also contains Java Virtual Machine (JVM). It provides the runtime environment.

JDK vs JRE vs JVM – Java Runtime Environment

Read about Top Java Books to Learn Java Programming

c. What is the Java Virtual Machine (JVM)?

Technology is evolving rapidly!
Stay updated with DataFlair on WhatsApp!!

JVM provides a runtime environment for executing Java bytecode. It is an abstract machine that is platform dependent and has 3 notions as a specification (Document that describes requirement of JVM implementation), Implementation (a Computer program that meets JVM requirements) and Instance (Implementation that executes Java bytecode).
Main tasks of JVM are:

3. Difference Between JDK, JRE, and JVM

Consider the following diagram.

Difference between JDK and JRE and JVM

Let’s Discuss Java Character Class Methods with Syntax and Examples

a.  JDK vs JRE Functions

i. What does JRE comprise of?

JRE comprises the accompanying segments.

Read About Packages in Java – Working & Types of Java Packages With Examples

ii. How do JRE functions?

See how the JRE functions let us consider a Java source record spared as Example.java. The record is incorporated into an arrangement of Byte Code that is put away in a “.class” document. Here it will be “Example.class”.

JDK vs JRE vs JVM – JRE functions

Actions at runtime –

The ClassLoader stacks every vital class required for the execution of a program. It gives security by isolating the namespaces of the nearby record framework from that imported through the system. These records are stacked either from a hard plate, a system or from different sources.
Do you know about the Island of Isolation in Java with Example

The JVM puts the code through the ByteCode Verifier that checks the format and checks for an illicit code. Illicit code, for instance, is code that disregards get to rights on objects or abuses the execution of pointers.
The Byte Code verifier guarantees that the code holds fast to the JVM particular and does not damage framework respectability.

JDK vs JRE vs JVM – Byte Code Verifier

At runtime, the Byte Code stacked, checked and keep running by the mediator. The translator has the accompanying two capacities:

Let’s Explore the Constructor in Java – Types of Constructor in Java

JDK vs JRE vs JVM – Java Interpreter

Difference between JDK vs JRE vs JVM – Java Interpreter

b.  How do JVM functions?

JVM turns into an occurrence of JRE at runtime of a Java program. It is generally known as a runtime interpreter. JVM to a great extent helps in the deliberation of internal execution from the software engineers who make utilization of libraries for their projects from JDK.

This was all about  JDK vs JRE vs JVM Tutorial. Hope you like our explanation.

Read About What is Jar File in Java and How to Create it

4. Conclusion

In this Java tutorial, we learned about what is JRE, JVM, and JDK. In addition, we explore the basic differences between JRE vs JVM vs JDK, with examples. Furthermore, if you have any query, feel free to ask in a comment section.

Related Topic- How to Convert Colored Image in Java

For reference

Exit mobile version