JVM, JRE, JDK and JIT ??




JIT:

Just in time (JIT) is a part of Java Virtual Machine (JVM) architecture. The job of JIT inside JVM is to compile bytecode into machine executable code in real time, on a piece-by-piece, demand basis.








When Java programs are executed, JVM does not read the entire Bytecode and converts it 
into machine instructions. If JVM tries to do this approach then the program execution 
time will be delayed for hours. Java has overcome the latency of program execution 
time by interpreting the required bytecode and keep the rest of the code aside.
Just in time (JIT) helps to compile code that is only needed and at the same time boost 
the program performance. Wheather the Java programs are interpreted traditional 
way or on the fly the functionality and features like portability and security remains 
the same.


Summary:Java compiler converts the Java source code that you write into a binary 

program consisting of bytecodes. Bytecodes are machine instructions for the Java 
Virtual Machine. When you execute a Java program, a program called the Java 
interpreter (JIT) inspects and decipher the bytecodes into machine executable language.


JVM:
JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime
environment in which java bytecode can be executed.

JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform
dependent because configuration of each OS differs. But, Java is platform independent.
The JVM performs following main tasks:

  1. Loads code
  2. Verifies code
  3. Executes code
  4. Provides runtime environment


JRE:
JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It is
the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM
uses at runtime.
Implementation of JVMs are also actively released by other companies besides Sun Micro Systems.





JDK:
JDK is an acronym for Java Development Kit.It physically exists.It contains JRE + development tools.






Comments

Popular posts from this blog

FC Barcelona vs Real Madrid -El Clasico Rivalry.

1NF,2NF, 3NF Normalization

Memory Management (Contiguous and Non-Contiguous ).