Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the hierarchy of JVM, JDK, JRE, JIT? [closed]

Tags:

java

jvm

jit

jdk1.6

Please explain in detail with regard to following points:

  • Does JDK contain JRE?
  • JDK converts .java to .class, then JVM understands the .class and converts in binary, then what is the actual need of JRE when OS can understand binary directly?
  • What is openJDK?
like image 518
user2350427 Avatar asked Jul 01 '13 15:07

user2350427


2 Answers

enter image description here

I hope the above image will describe the answer

Source: here

like image 95
stinepike Avatar answered Oct 01 '22 01:10

stinepike


Java Developer Kit(JDK) contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer etc. Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method. You need JDK, if at all you want to write your own programs, and to compile them. For running java programs, JRE is sufficient.

JRE is targeted for execution of Java files. i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries. JDK is mainly targeted for java development.

OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE).

The Just-In-Time (JIT) compiler is a component of the Java™ Runtime Environment that improves the performance of Java applications at run time.

You can get the entire conceptual diagram here.

like image 28
AllTooSir Avatar answered Oct 01 '22 00:10

AllTooSir