🟢 Foundation  ·  Lesson 02

JDK, JRE and JVM

JDK, JRE and JVM

The Three Pillars of Java

To run Java you must understand three terms: JVM, JRE and JDK. They fit inside each other like boxes.

JVM (Java Virtual Machine)

The JVM runs Java bytecode. It converts the compiled .class file into machine code for your specific OS. This is what makes Java platform-independent.

JRE (Java Runtime Environment)

The JRE = JVM + libraries needed to RUN Java programs. If you only want to run Java apps (not build them), the JRE is enough.

JDK (Java Development Kit)

The JDK = JRE + development tools (compiler javac, debugger). To WRITE and compile Java, you need the JDK.

Quick Comparison

TermContainsUsed For
JVMruns bytecodeexecution engine
JREJVM + librariesrunning Java apps
JDKJRE + compiler + toolsdeveloping Java
Relationship: JDK ⊃ JRE ⊃ JVM (JDK contains JRE, which contains JVM).

Summary

  • JVM runs bytecode (makes Java platform-independent).
  • JRE = JVM + libraries (to run apps).
  • JDK = JRE + compiler/tools (to develop apps).

Java के तीन स्तंभ

Java चलाने के लिए तीन terms समझने ज़रूरी हैं: JVM, JRE और JDK। ये एक-दूसरे के अंदर डिब्बों की तरह fit होते हैं।

JVM (Java Virtual Machine)

JVM Java bytecode चलाता है। यह compiled .class file को आपके OS के लिए machine code में बदलता है। यही Java को platform-independent बनाता है।

JRE (Java Runtime Environment)

JRE = JVM + Java programs चलाने के लिए ज़रूरी libraries। अगर आप सिर्फ Java apps चलाना चाहते हैं (बनाना नहीं), तो JRE काफी है।

JDK (Java Development Kit)

JDK = JRE + development tools (compiler javac, debugger)। Java लिखने और compile करने के लिए JDK चाहिए।

तुरंत तुलना

Termक्या होता हैकिसके लिए
JVMbytecode चलाता हैexecution engine
JREJVM + librariesJava apps चलाना
JDKJRE + compiler + toolsJava develop करना
संबंध: JDK ⊃ JRE ⊃ JVM (JDK में JRE, JRE में JVM)।

सारांश

  • JVM bytecode चलाता है (Java को platform-independent बनाता है)।
  • JRE = JVM + libraries (apps चलाने के लिए)।
  • JDK = JRE + compiler/tools (apps बनाने के लिए)।
← Back to Java Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

\n