pratiksha55
Dołączył: 12 Wrz 2025 Posty: 2
|
Wysłany: Pią Wrz 12, 2025 11:19 Temat postu: Distinguish between JDK, JRE, and JVM. |
|
|
1. JVM (Java Virtual Machine)
What it is: A runtime environment that executes Java bytecode.
Role: It converts compiled Java bytecode (.class files) into machine code so the program can run on any operating system.
Key Point: JVM makes Java platform-independent (Write Once, Run Anywhere).
Includes: Just the engine to run Java bytecode, not tools for development.
Java Course in Pune
2. JRE (Java Runtime Environment)
What it is: A package that provides everything needed to run a Java program.
Role: It contains the JVM + libraries + other supporting files.
Key Point: If you only want to execute Java programs (not develop them), JRE is enough.
Includes:
JVM
Core libraries (like java.lang, java.util, etc.)
Other runtime components
Java Course in Pune
3. JDK (Java Development Kit)
What it is: A full package for developing and running Java applications.
Role: Provides all tools and libraries for Java development + JRE for execution.
Key Point: Developers use JDK to write, compile, and run Java code.
Includes:
JRE (which includes JVM)
Development tools (compiler javac, debugger, etc.)
Documentation and APIs
Quick Comparison Table
Feature
JVM
JRE
JDK
Purpose
Executes bytecode
Runs Java programs
Develops & runs Java programs
Contains
Interpreter + JIT
JVM + libraries
JRE + development tools
Who uses it?
Runtime engine
End users
Developers
Example Tools
None
Java libraries
javac, javadoc, javap
In short:
JVM = Runs Java bytecode
JRE = JVM + libraries (for running)
JDK = JRE + tools (for development)
Java Classes in Pune |
|