Difference between JDK JRE and JVM ?

JDK

  • Java Development Kit is the core component of Java Environment and provides all the tools, executables and binaries required to compile, debug and execute a Java Program.
  • JDK is a platform specific software and thats why we have separate installers for Windows, Mac and Unix systems.
  • We can say that JDK is superset of JRE since it contains JRE with Java compiler, debugger and core classes. Current version of JDK is 1.7 also known as Java 7.

JVM

  • JVM is the heart of java programming language. When we run a program, JVM is responsible to converting Byte code to the machine specific code.
  • JVM is also stage dependent and provides core java functions like memory management, garbage collection, security etc.
  • JVM is customizable and we can use java options to modify it, for example allocating minimum and maximum memory to JVM. JVM is called virtual because it delivers a interface that does not depend on the underlying operating system and machine hardware.
  • This independence from hardware and operating system is what makes java program write-once run-anywhere.

JRE

  • JRE is the implementation of JVM, it provides platform to execute java programs. JRE consists of JVM and java binaries and other classes to execute any program successfully.
  • JRE doesn’t contain any development tools like java compiler, debugger etc.
  • If you want to execute any java program, you should have JRE installed but we don’t need JDK for running any java program.

JDK JRE JVM
Java Development Kit Java Runtime environment. Java Virtual Machine.
Kit providing the platform to develop
and execute/run the java program.
It is an installation package
which provides environment to only
run(not develop) the java program
(or application)onto your machine.
Whatever Java program you run using JRE or JDK goes into JVM and JVM is responsible for executing the java program
line by line hence it is also known as interpreter.
JDK is only used by
Java Developers.
JRE is only used by them who
only wants to run the Java Programs
(i.e). end users of your system.
It is in-built in both JDK and JRE.

Categorized in:

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,