Scroll to top

jdk vs jre vs jvm

In order to understand JDK vs JRE vs JVM. You need to first understand each and every term. So let’s start by defining JDK (Java Development Kit), JRE (Java Runtime Environment), and JVM (Java Virtual Machine).

JDK (Java Development Kit)

JDK contains everything that will be required to develop and run Java application.

JRE (Java Runtime Environment)

JRE contains everything required to run Java application which has already been compiled. It doesn’t contain the code library required to develop Java application.

JVM (Java Virtual Machine)

JVM is a virtual machine which works on top of your operating system to provide a recommended environment for your compiled
Java code. JVM only works with bytecode. Hence you need to compile your Java application(.java) so that it can be converted to bytecode format (also known as the .class file).

Which then will be used by JVM to run an application. JVM only provide the environment needed to executed Java Bytecode.


The below chart shows the different features of each of the Java technologies.

JDK vs JRE vs JVM*Image Courtesy: Oracle Corporation

Now as per the diagram you can identify what is the difference.

JRE = JVM + Required Library to run Application.

JDK = JRE + Required Library to develop Java Application.

Java Portability

In order to understand portability in Java, you need to understand what happens to java code from start to finish.

  • Java Source Code (Written by Developer) (Machine Neutral)
  • Compiled Code / Byte Code (Compiled by javac). (Machine Neutral)
  • Byte Code executed (Executed by JVM) (Machine Specific)

In step 2, javac (Java Compiler) converts Java code to bytecode. This can be moved to any machine(Windows / Linux) and executed by JVM. JVM reads the bytecode and generates machine specific code. In order to generate machine-specific code, JVM needs to be machine specific. So every type of Machine(Windows / Linux / Mac) has a specific JVM. So in this way, the coder
doesn’t need to bother with generating bytecode. JVM takes care of portability. So the final answer is Java is Portable
but JVM is Machine Specific.


Author avatar


  1. Huu Chi

    This is new chapter for Core Java?

  2. loku

    This is a great article to know the basics differences between all these three main terms. Liked it. Keep going on!!

  3. jason

    Great article thanks

  4. Vijay G

    It is very simple but explains crystal clear about the basics of jdk, jre and jvm… Anyone can understand so easily…

  5. richa

    Clear nd easy to understand..

  6. Nandu


    I am very new beginner for java…This is very nice tutorial.

    I need some clarification reg JDK,JRE and JVM

    As you said, JRE is combination of specific libraries(math and util) and JVM,

    For a simple HELLO WORLD program ,will javac and JVM be enough to compile and get the result as there is no use of specific libraries in evaluating the result?


    • Hi Nandu,

      Sorry for late reply. As per your question it might look like you only need only javac and JVM. But truth is even if you don’t import any library there are some libraries which will be imported implicitly. and you will require some basic libraries even for simplest application.
      Hope it clarifies.


  7. sushma

    very clear and easy to understand.

  8. awsm article clearly understand the concept of java portability.
    thank you sir!!!

  9. kakarlapudi balaji raju

    any body can understand

  10. Snigdah Dash

    Crystal clear comparision. Easy to understand..

  11. sandeep

    very nice article, thanks for sharing this

  12. avnika

    Nice to understand.. i would like to learn core java need online classes if possible to you can you please share your details

  13. Poomaran

    Simple and Clear…

    Wisely done. Thanks.

  14. susmitha

    Very clear. Nice article

  15. vrushali

    its really very helpful for beginner. awsm article. really thakful

  16. kashif

    Dear author,
    You’ve spent so much effort putting all this up, which can become even better with some editing, especially punctuation and sentence flow.
    it’s just a suggestion. Keep up the good work!

    • I do agree with you there are problems with articles. And we have just started working on that. We can’t revisit all old articles. But we are trying touch base and correct article as much as possible. Thanks for your suggestion though.


  17. HOMER

    y’all are so awesome at this i’m really getting the hang of this it’s really FUN

  18. krishna

    I want more information about jdk jvm and jre..

  19. Mr.Khun Nyan Thein

    Good thank you so much!!!

  20. Sindhu

    Cannot download the Ebook .please help me
    Also, is it up to the date ..?

  21. Hussain

    So much beginer content.

  22. Girish Barhate

    very Easy to learn

  23. apexa

    it is really very helpful thank you..

  24. Ranjita

    So clear and easy to understand, Thank you

  25. Nabanita Barik

    Thanks .. it’s cool and crystal clear to understand easily

  26. pranit

    very helpful and informative article, you have shared a great points here between JDK, JRE and JVM. To know these terms you must know the exact difference between them, very good. Thanks a lot for sharing!

  27. Subas

    Difference between JVM,JRE,JDK

    JRE = JVM + Required Library to run Application.

    JDK = JRE + Required Library to develop Java Application.

    JVM = JVM only provide the environment needed to executed Java Bytecode.

  28. Shashikala R

    Awesome stuff. Looks like someone is finally interested in sharing the knowledge rather than hiding behind pretentious pile of jargon

Post a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.