Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

JVM , JRE & JDK – Understand & Differentiate in Simple Words

Posted on 01/13/2025 By admin

This is a frequently asked interview question of Java because people always gets confused with these terms and used interchangeably. I will try to explain these terms in easy words.

There are three stages for writing a code in any programming language – Development , Compilation and Execution. In Java programming language, there are three major components –

JVM is an internal part of JRE and JRE is an internal part of JDK. If you want to develop and execute a Java program – You need JDK. When we say JDK, it means you indirectly required JRE and JVM. You want to just execute a java program – You need only JRE.

  1. It is an abstract (Virtual) machine which loads, verifies, and executes bytecode (.class file).
  2. After compiling a .java file, we gets .class file that is called bytecode.
  3. JVM converts this bytecode to machine readable code based on platform.
  4. This is the reason JVM is platform dependent which makes Java a platform independent language.
  5. It contains many blocks – Class Loader, Memory Areas, Execution Engine Interpreter and JIT compiler.
  6. The JVM is called a virtual machine because the JVM definition defines an abstract machine. This includes registers, stack, etc, and the byte code that Java source is compiled to is practically machine code for this virtual machine. The JVM then interprets or compiles this bytecode into native machine instructions.
  7. We can find JVM as .dll file( in windows) and .so(in Linux) . Below is screenshot of JVM in windows:
  8. It resides inside JRE.

  1. It consists of JVM and many software packages (Supported classes to run Java programs, Property files etc.) which help JVM to perform its tasks.
  2. JRE is available outside of JDK as well. If you just want to execute .class file, you need JRE only.
  3. JRE is responsible for providing a runtime environment only. This is the reason it does not contain any development tools like compiler and debugger.
  4. JRE is platform dependent which makes Java a platform independent language.
  5. In below image, you can see JRE contains bin ( JVM ) and supported libs.

  1. JDK consists of development tools and run time environment (JRE).
  2. If you want to develop and run a java program, you need a JDK.
  3. It is a kit or complete package to develop, compile and execute a Java program. It means that it contains JRE and JRE contains JVM. This is the reason it is called as a Kit.
  4. It is also platform dependent which makes Java a platform independent language.
  5. When we download JDK, you can see it consists JRE in it .

Below image will give you better understanding:

Hope, it will be easy for you now to differentiate among JVM, JRE and JDK. I will suggest you to remember in same flow i.e. JVM, JRE and JDK.

In case of any doubt, suggestion or you find some mistake, feel free to let me know in comments.

#ThanksForReading

#DonateIfYouThinkMyPostsHelpYou

Uncategorized

Post navigation

Previous Post: Frequently Asked Java Program 19: Java Program to Reverse Position of Words in a String
Next Post: ThreadLocal Static WebDriver For Parallel Execution

Related Posts

loadurlOutput – Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized
API Testing Tutorial Part 6 – Idempotent Methods in HTTP Methods Uncategorized
Creating Object Repository In Selenium WebDriver Using Properties File As An External Source Uncategorized
image – Make Selenium Easy Uncategorized
Params – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark