PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Java · Theory

Difference between JDK, JRE and JVM

← All stacks

Theory

8/270

Difference between JDK, JRE and JVM

Three names that look similar — JVM, JRE, JDK. Freshers mix them. Learn them as three boxes, one inside the other.

JVM (Java Virtual Machine) is the engine. It reads bytecode and runs your program. Without JVM, a .class file does nothing.

JRE (Java Runtime Environment) is JVM plus the libraries needed to run a ready app. If you only want to run a Java program, JRE is enough.

JDK (Java Development Kit) is JRE plus tools for writing code — mainly javac (compiler). If you write programs in college, you install JDK, not only JRE.

Picture — JDK contains JRE. JRE contains JVM. Developer → JDK. Only run apps → JRE. Engine inside → JVM.

Let's take this on the board with one tiny Main class — no extra files. Difference between JDK, JRE and JVM — output: JVM → runs bytecode / JRE → JVM + libraries / JDK → JRE + javac/tools. Say that nesting in the viva. Start from main, go line by line, and stop at each print. That output is the proof for Difference between JDK, JRE and JVM.

Diagram
JDK   (write + compile)
    javac + tools
      JRE   (run apps)
        libraries
          JVM   (run bytecode)
Exam tip

Draw JDK > JRE > JVM. One line each.

Example

// JDK / JRE / JVM — remember the nesting
public class Main {
  public static void main(String[] args) {
    System.out.println("JVM  → runs bytecode");
    System.out.println("JRE  → JVM + libraries");
    System.out.println("JDK  → JRE + javac/tools");
  }
}

Difference between JDK, JRE and JVM — output: JVM → runs bytecode / JRE → JVM + libraries / JDK → JRE + javac/tools. Say that nesting in the viva.

Short notes

  • DefJVM = engine that runs bytecode. JRE = run apps. JDK = write + compile.
  • RuleJDK contains JRE. JRE contains JVM.
  • RememberA student must install JDK, not only JRE (need javac).
  • DiffJDK ≠ JRE. One is for building, one is mainly for running.

Questions

1

What is JVM?

2

What is JRE?

3

What is JDK?

4

What should a student install?

5

Is JDK the same as JRE?

Previous← How to set path in JavaNextJVM: Java Virtual Machine →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.