Wednesday, March 14, 2018

Difference between JDK ,JRE and JVM

This is one of the very basic java interview question for specially junior java developer , as everyone heard about JDK JRE and JVM but some of the people don’t exactly know what are these actually.
Today we will understand these three words and whats there meaning and how they are different from each other.

What is JDK ?
JDK Stands for Java Developement Kit which is required by the Java Developer for Development of application . JDK consist of JRE along with some Utitlies like java compiler and other library files with it like interpreter , archiever (jars).
JDK is basically provide the development environment to java developers.
JDK Current Version is – 1.9  10

What is JRE ?
JRE Stand for Java Runtime Environment , That means It provide the runtime environment for the Java application to run on the system. It is just for running the java application , if you dont have any JDK in system and you just want to run the java application the minimum requirement is to have JRE
Current Version of JRE is 1.9  10

What is JVM?
JVM is Java Virtual Machine , It is the heart of the java programming language. Its main responsibility is to convert the java byte code to machine specific code using native apis, It is platform dependent and it perform all the memory management , garbage collector work if JVM crashes the JAVA program will be stoped working.

Let see the Difference between JDK & JRE & JVM

It contains all the Debugging tools, development tools for application development along with JRE as well
It contains the JVM along with the Other java binaries for java program to be executed
It is the heart of the java programming language , responsible to convert byte code to machine codes.
It is for developer
It is for non-developers
It required for both and is platform dependent

Also see : Top 10 Interview Questions for Java developers
There are so many other times as well to see but for the simple difference , mentioned above are the important differences.

We have also heard about JIT( Just in time ) Compiler?

JIT is not JVM , its very confusing for the student to uderstand , but the simple concept is JIT is in JVM A Just-In-Time (JIT) compiler is a feature of the run-time interpreter, that instead of interpreting bytecode every time a method is invoked, will compile the bytecode into the machine code instructions of the running machine, and then invoke this object code instead. Ideally the efficiency of running object code will overcome the inefficiency of recompiling the program every time it runs

Thanks for reading


Post a Comment