We will see basic knowledge of JVM , JDK and JRE as these are basic core tools required for java application development. By names, these seems similar but there are some significant features for these.
JDK : Java Development Kit
It is core component for JAVA and it has as all required tools, binaries and executable to compile, run and debug the java application.
It is platform specific implementation and that's why we have separate installation for windows, UNIX and Mac OS.
JDK is super set of JRE, because it included JRE with compiler, debugger and core classes required for java application development.
JVM : Java Virtual Machine
We can say it is heart of Java program why because when we run the java program, JVM is responsible to convert the byte code to machine specific code.
It is also platform dependent and it provides core java functions like memory management, Garbage collector tools and Security.
We can customize the JVM memory using java options like -Xmx to set maximum size.
It is virtual machine. It provides interface which is independent on Hardware and Operating system. With this independence , we call java as write once and run anywhere.
JVM will do below functions:
1. Class loader
2. Code verifies
3. Execute code
4. Provides JRE
JRE : Java Runtime Environment
It is implementation of JVM. JRE is the platform where we can execute the java program. JRE consists of JVM and other binaries required to run the java program.
It does not contain any compiler and debug tools. it has tools required to run the java program.
So if we want to run the java program, JRE should be installed on machine. We do not need JDK to execute java Program.
If we want to compile and debug the java application, JDK should be installed on machine.
JDK : Java Development Kit
It is core component for JAVA and it has as all required tools, binaries and executable to compile, run and debug the java application.
It is platform specific implementation and that's why we have separate installation for windows, UNIX and Mac OS.
JDK is super set of JRE, because it included JRE with compiler, debugger and core classes required for java application development.
JVM : Java Virtual Machine
We can say it is heart of Java program why because when we run the java program, JVM is responsible to convert the byte code to machine specific code.
It is also platform dependent and it provides core java functions like memory management, Garbage collector tools and Security.
We can customize the JVM memory using java options like -Xmx to set maximum size.
It is virtual machine. It provides interface which is independent on Hardware and Operating system. With this independence , we call java as write once and run anywhere.
JVM will do below functions:
1. Class loader
2. Code verifies
3. Execute code
4. Provides JRE
JRE : Java Runtime Environment
It is implementation of JVM. JRE is the platform where we can execute the java program. JRE consists of JVM and other binaries required to run the java program.
It does not contain any compiler and debug tools. it has tools required to run the java program.
So if we want to run the java program, JRE should be installed on machine. We do not need JDK to execute java Program.
If we want to compile and debug the java application, JDK should be installed on machine.
No comments:
Post a Comment