Difference between JDK, JRE, JVM

Answer Posted / pradeep panwar(sse)

JDK: Java Developer Kit contains tools needed to develop
the Java programs, and JRE to run the programs. The tools
include compiler (javac.exe), Java application launcher
(java.exe), Appletviewer, etc…

Compiler converts java code into byte code. Java
application launcher opens a JRE, loads the class, and
invokes its main method.

You need JDK, if at all you want to write your own
programs, and to compile them. For running java programs,
JRE is sufficient.

JRE: Java Runtime Environment contains JVM, class
libraries, and other supporting files. Actually JVM runs
the program, and it uses the class libraries, and other
supporting files provided in JRE. If you want to run any
java program, you need to have JRE installed in the system.

JVM: Java Virtual Machine interprets the bytecode into the
machine code depending upon the underlying operating system
and hardware combination. It is responsible for all the
things like garbage collection, array bounds checking, etc…
JVM is platform dependent.

The JVM is called "virtual" because it provides a machine
interface that does not depend on the underlying operating
system and machine hardware architecture. This independence
from hardware and operating system is a cornerstone of the
write-once run-anywhere value of Java programs.

Is This Answer Correct ?    158 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the library functions in java?

550


What’s the difference between applets and standalone program?

534


What is a null check?

539


Is java a prime method?

553


What are the two ways in which thread can be created?

598






What is lazy programming?

567


Why does java doesnt suuport unsigned values?

1798


What is static import?

602


Can we compare two strings in java?

556


What do negative exponents mean?

548


What is the use of math abs in java?

549


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

579


Mention the default values of all the elements of an array defined as an instance variable.

523


Why string is immutable or final in java

615


Define how destructors are defined in java?

588