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.



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.

  • Loads Code
  • Verifies Code
  • Executes Code
  • Provides Runtime Environment

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.

  • A particular where the working of Java Virtual Machine is determined. Be that as it may, usage supplier is free to pick the calculation. Its usage has been given by Sun and different organizations.
  • An implementation is a PC program that meets the prerequisites of the JVM particular.
  • Runtime Instance Whenever you compose java order on the summon provoke to run the java class, an occasion of JVM is made.
  • JDK or Java Development Kit is a kit that physically exists, it contains JRE+ and other tools.

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)?

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:

  • Loading Code
  • Verifying Code
  • Executing Code
  • Providing Runtime Environment

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.

  • Deployment Techniques – It includes arrangement, Java Web Start and Java Plug-in.
  • UI toolkits – User Interface including Abstract Window Toolkit (AWT), Swing, Java 2D, Accessibility, Image I/O, Print Service, Sound, intuitive (DnD) and information techniques.
  • Integration libraries – It includes Interface Definition Language (IDL), Java Database Connectivity (JDBC, Remote Method Invocation (RMI), Remote Method Invocation over Internet Inter-Orb Protocol (RMI-IIOP) ), Java Naming and Directory Interface (JNDI) and scripting.
  • Other base libraries, including worldwide help, input/yield (I/O), expansion instrument, Beans, Java Management Extensions (JMX), Java Native Interface (JNI), Math, Networking, Override Mechanism, Security, Serialization and Java for XML Processing (XML JAXP).
  • Lang and util base libraries – It includes lang and util, administration, forming, zip, instrument, reflection, Collections, Concurrency Utilities, Java Archive (JAR), Logging, Preferences API, Ref Objects and Regular Expressions.
  • Java Virtual Machine (JVM), including Java HotSpot Client and Server Virtual Machines.

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 –

  • Java ClassLoader

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

  • Java Byte Code Verifier

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

  • Java Interpreter

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

  • Execute the Byte Code
  • Make proper calls to the hidden equipment

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

Your opinion matters
Please write your valuable feedback about DataFlair on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *