InternDoor

Java · 1 min

How the JDK, JRE, and JVM work together

Learn how the JDK, JRE, and JVM interact to compile source code with javac and execute bytecode.

Practise JavaMore videos

The quiz

How are the JDK, the JRE and the JVM related?

  1. The JDK contains the JRE plus tools such as javac; the JRE contains the JVM plus the standard libraries; the JVM runs bytecode
  2. The JVM contains the JDK
  3. The JRE is needed to compile Java, the JDK to run it
  4. They are three names for the same program
Show the answer

A. The JDK contains the JRE plus tools such as javac; the JRE contains the JVM plus the standard libraries; the JVM runs bytecode

Transcript

Java ka runtime ek nested structure hai, JDK, JRE aur JVM aapas mein kaise jude hain?

Pehle JDK ka javac code ko bytecode banata hai, phir JRE runtime libraries deta hai aur JVM bytecode ko executes karta hai.

Yahi asli baat hai, JDK development compiler tools contains karta hai, aur JRE standard libraries ke saath JVM rakhta hai program chalane ke liye.

Terminal par tum javac se source code compile karte ho, phir java command se JVM us bytecode ko seedhe run kar deta hai.

JRE alone se compile mat socho, mat assume karo ki JVM mein javac hai, compile ke liye JDK install karo aur bytecode ke liye JVM par rely karo.

Screen par sawaal dekho, JDK, JRE aur JVM ka sahi relation kya hai? Video pause karo aur apna answer sochkar choose karo.

Sahi answer A hai kyonki JDK mein JRE aur javac dono hote hain, jabki option C galat hai kyonki JRE code compile nahi karta.

Exam revision ke liye yeh table save kar lo, aur core Java concepts ko free mein InternDoor par roz practice karo.

More study videos

All videos
Learned it? See who is hiring

Engineering internships and entry-level jobs in India, newest first.