Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Interview question

What is the difference between JVM, JDK, and JRE? JVM, JDK और JRE में क्या अंतर है?

Answer
ComponentJVM (Java Virtual Machine)JRE (Java Runtime Environment)JDK (Java Development Kit)
PurposeExecutes Java bytecodeRuntime environment for Java appsComplete development environment
ContainsOnly bytecode executionJVM + libraries + tools for runningJRE + compiler + debugger + tools
Use CaseExecute compiled bytecodeRun Java applicationsDevelop Java applications
CompilationN/ANot neededIncludes javac compiler
SizeSmallestMediumLargest
UsersEnd usersEnd users (users running apps)Developers
// Compilation Process
// 1. Developer writes .java files
// 2. javac (in JDK) compiles to .class bytecode
// 3. JVM (in JRE) executes the .class files

// Example:
// javac HelloWorld.java  // JDK compiler
// java HelloWorld        // JVM execution

// Relationship:
// JDK = JRE + Development Tools
// JRE = JVM + Libraries
// JVM = Bytecode Execution Engine

// Installation:
// To run Java apps: Install JRE only
// To develop Java apps: Install JDK (which includes JRE)
ComponentDescription
JVMJava bytecode को execute करता है
JREJVM + libraries - apps run करने के लिए
JDKJRE + compiler + tools - development के लिए

Was this answer clear?