DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Java
  4. Difference Between JDK vs JRE vs JVM

Difference Between JDK vs JRE vs JVM

Explore the main differences between these essential Java tools.

Rinu Gour user avatar by
Rinu Gour
·
Nov. 21, 18 · Presentation
Like (30)
Save
Tweet
Share
48.49K Views

Join the DZone community and get the full member experience.

Join For Free

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

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 the runtime environment

What Is the Java Runtime Environment (JRE)?

Java Runtime Environment or JRE is also known as Java RTE. The 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 a 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

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 three notions as a specification, a document that describes requirement of JVM implementation, implementation, a computer program that meets JVM requirements, and instance, an implementation that executes Java bytecode.

Main Tasks of the JVM Are:

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

Difference Between JDK, JRE, and JVM

Consider the following diagram.

Difference between JDK and JRE and JVM

JDK Vs. JRE Functions

What Does the 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.

How About 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 ByteCode 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.

  • Java ByteCode 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 rights on objects or abuses the execution of pointers.
The ByteCode 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 ByteCode stacked, checked, and kept running by the mediator. The translator has the accompanying two capacities:

  • Execute the ByteCode
  • Make proper calls to the hidden equipment

JDK vs JRE vs JVM – Java Interpreter

Difference between JDK vs JRE vs JVM – Java Interpreter

How About 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.

Conclusion

In this Java tutorial, we learned about what is the JRE, JVM, and JDK. In addition, we explored the basic differences between JRE, JVM, JDK, with examples. Furthermore, if you have any further questions, feel free to ask in a comments section below.

Java (programming language) Java virtual machine Java Development Kit JRE

Published at DZone with permission of Rinu Gour. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Create a REST API in C# Using ChatGPT
  • Required Knowledge To Pass AWS Certified Solutions Architect — Professional Exam
  • 10 Best Ways to Level Up as a Developer
  • Create Spider Chart With ReactJS

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: