Pages Navigation Menu

Coding is much easier than you think

Differentiate JVM JRE JDK JIT ?

 
Java Virtual Machine (JVM) is an abstract computing machine. Java Runtime Environment (JRE) is an implementation of the JVM. Java Development Kit (JDK) contains JRE along with various development tools like Java libraries, Java source compilers, Java debuggers, bundling and deployment tools.
 

jvm-jre-jdk


 
JVM becomes an instance of JRE at runtime of a java program. It is widely known as a runtime interpreter. It is the component of the Java technology responsible for its hardware and platform independence. JVM largely helps in the abstraction of inner implementation from the programmers who make use of libraries for their programmes from JDK.
 

JVM Internals

 
Like a real computing machine, JVM has an instruction set and manipulates various memory areas at run time. Thus for different hardware platforms one has corresponding implementation of JVM available as vendor supplied JREs. It is common to implement a programming language using a virtual machine. Historicaly the best-known virtual machine may be the P-Code machine of UCSD Pascal.

A Java virtual machine instruction consists of an opcode specifying the operation to be performed, followed by zero or more operands embodying values to be operated upon. From the point of view of a compiler, the Java Virtual Machine (JVM)is just another processor with an instruction set, Java bytecode, for which code can be generated. Life cycle is as follows, source code to byte code to be interpreted by the JRE and gets converted to the platform specific executable ones.

 

Just-in-time Compiler (JIT)

 
JIT is the part of the Java Virtual Machine (JVM) that is used to speed up the execution time. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation. Here the term ‘€œcompiler€ refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU.
 

Sun’€™s JVM

 
Sun’€™s implementations of the Java virtual machine (JVM) is itself called as JRE. Sun’€™s JRE is availabe as a separate application and also available as part of JDK. Sun’€™s Java Development Tool Kit (JDK) comes with utility tools for byte code compilation €œjavac€. Then execution of the byte codes through java programmes using €œjava€ and many more utilities found in the binary directory of JDK. €˜java€™ tools forks the JRE. Implementation of JVMs are also actively released by other companies besides Sun Micro Systems.
 

To keep getting updates on Android, JAVA Design Patterns, STRUTS 2, SPRING MVC, SOAP-UI, SharePoint, FTP, SFTP tutorials and many more please like our facebook fan page SimpleCodeStuffs