Java Development Kit (JDK): Java Development Kit contains two parts. One part contains the utilities like javac, debugger, jar which helps in compiling the source code (.java files) into byte code (.class files) and debug the programs. The other part is the JRE, which contains the utilities like java which help in running/executing the byte code. If we want to write programs and run them, then we need the JDK installed.
Java Compiler (javac): javac is the executable/application which compiles the .java source files into the byte code (.class files). javac is included in JDK.
Java Run-time Environment (JRE): Java Run-time Environment helps in running the programs. JRE contains the JVM, the java classes/packages and the run-time libraries. If we do not want to write programs, but only execute the programs written by others, then JRE alone will be sufficient.
Java Virtual Machine (JVM): Java Virtual Machine is important part of the JRE, which actually runs the programs (.class files), it uses the java class libraries and the run-time libraries to execute those programs. Every operating system(OS) or platform will have a different JVM.
Java Executable(java): java is the application which runs/executes the .class files. This internally calls the JVM for running the programs.
Just In Time Compiler (JIT): JIT is a module inside the JVM which helps in compiling certain parts of byte code into the machine code for higher performance. Note that only certain parts of byte code will be compiled to the machine code, the other parts are usually interpreted and executed.
is distributed in two packages - JDK
. When JDK
is installed it also contains the JRE
apart from the compiler, debugging tools. When JRE
is installed it contains the JVM
and the class libraries.
The two most important
things we need to remember from this topic before we proceed further is javac
helps in compiling the program and java
helps in running the program. When the words Java Compiler
is used it refers to javac
, when the words JRE
, Run-time Enviroment
, Virtual Machine
are used, it refers to java