JVM JRE JDK- What’s the relation


In this article:

  • Learn common confusion among JVM, JRE and JDK.
  • This will help to understand processing of a java class.

The background:

A java programmer writes java file. And its gets executed on any environment. Have you ever thought how? Once programmer done with writing java file, his/her job is done. He/She nothing to worry about what all needed to run java program.  But hold on this is not possible on simple computer. Then how? Time to explore this.

Explore this:

That computer must have JDK (java development kit) which provides all necessary tools and libraries to write and execute java programs. Inside JDK, there is JVM (java virtual machine) which reads .class files (the converted .java file from compiler). JVM just understand how to read .class files, it takes help from JRE (Java run time enviroment) to execute .class file. Following pictures depicts this–


If you understand set theory, then in that way- JDK is super set  of JRE; and JRE is super set of JVM.


One of the most important interview question is why JVM is called virtual? Answer is JDK is a software bundle which contains JVM too. As there is no physical existence of JVM, hence it is virtual.

What Next:

Go in depth of  JVM internals, class loading and garbage collection. This will provide you solid base for writing efficient programs. Providing some links and books which will surely help you. All the very best.

  • JVM internals-

JVM architecture

JVM in concise way

  • Book on Garbage collection and more

Java Performance By Charlie Hunt, Binu John

Till then happy reading,

Nirbhaya Bhava!!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s