What is JVM, JRE, JDK and JIT

Bookmark
In this lesson let us learn about what is Java JVM, JRE, JDK and JIT.

Most of the beginners find it difficult to understand the difference between these jargons. In short,

  • Java Virtual Machine (JVM) is an abstract definition of a computing machine.
  • Java Runtime Environment (JRE) is the implementation of the JVM.
  • Java Development Kit (JDK) is a set of tools using which Java programs can be developed and compiled.
  • Just In Time Compiler (JIT) runs on the fly in the execution environment to make optimizations on the program.
Java-JVM-JRE-JDK-JIT

Java Virtual Machine (JVM)

JVM is an abstract computing machine used to implement Java language. JVM is the key component in the Java eco system. Java's important property is platform independence and to achieve that the role of JVM is critical. The JVM sits on top of the hardware and is used to execute the Java programs. Input for the JVM is Java byte code and it interprets the instructions in the byte code thus executing the programs.

Java Runtime Environment (JRE)

JRE is the software environment where the compiled Java byte codes executes. JRE is the implementation of JVM it includes the code required for running the programs and native code. It contains the implementation of Java interpreter, garbage collector, class loader, java class libraries and related files. You can download the JRE separately or as a bundle along with JDK from Oracle's website.

Java Development Kit (JDK)

Java JDK is the software bundle using which the Java applications can be developed. JDK's main component is the Java compiler using which the Java source code is compiled to byte code. Along with the Java compiler it contains more tools like Jar, JConsole, Javaw, etc. These help tools help in various different aspects of developing a Java application. The JDK bundle can be downloaded from the above given link in Oracle's website.

Just-in Time Compiler (JIT)

JIT compiler is a component that is part of the JVM and hence its implementation JRE. JIT runs when the Java program is interpreted and its objective is to optimize the Java program and make it efficient in terms of performance.

Exception Occured:

TypeErrorException
Messageerror_log(app.log): Failed to open stream: Permission denied
File/home/dh_czz6eb/tutorialwalk.com/common/error.php
Line36
Trace#0 (): log_error(2, 'error_log(app.log): Failed to open stream: Permission denied', '/home/dh_czz6eb/tutorialwalk.com/common/error.php', 36)
#1 /home/dh_czz6eb/tutorialwalk.com/common/error.php(36): error_log('02-12-2024 15:37:04 pm (IST),/home/dh_czz6eb/tutorialwalk.com/common/common.php,193,0,ErrorException,Optional parameter $per_page declared before required parameter $href is implicitly treated as a required parameter,/java/what-is-jvm-jre-jdk-and-jit.html,#0 /home/dh_czz6eb/tutorialwalk.com/common/error.php(115): log_error(8192, 'Optional parame...', '/home/dh_czz6eb...', 193)
#1 [internal function]: check_for_fatal()
#2 {main}
', 3, 'app.log')
#2 /home/dh_czz6eb/tutorialwalk.com/common/error.php(8): log_exception(ErrorException)
#3 /home/dh_czz6eb/tutorialwalk.com/common/error.php(115): log_error(8192, 'Optional parameter $per_page declared before required parameter $href is implicitly treated as a required parameter', '/home/dh_czz6eb/tutorialwalk.com/common/common.php', 193)
#4 (): check_for_fatal()
REQUEST_URI/java/what-is-jvm-jre-jdk-and-jit.html