[go: up one dir, main page]

0% found this document useful (0 votes)
143 views4 pages

JDK Jre JVM

The document discusses the differences between JDK, JRE, and JVM. JDK is a development kit that includes tools for coding Java programs as well as the JRE. The JRE provides runtime support for executing Java code but does not include development tools. The JVM is software that allows Java programs to run on different platforms by interpreting Java bytecode.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views4 pages

JDK Jre JVM

The document discusses the differences between JDK, JRE, and JVM. JDK is a development kit that includes tools for coding Java programs as well as the JRE. The JRE provides runtime support for executing Java code but does not include development tools. The JVM is software that allows Java programs to run on different platforms by interpreting Java bytecode.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Difference between JDK,JRE and JVM

out of all the programming languages, Java is the most common one for the purpose of
development today. Most developers use it for mobile and desktop computing, game development,
back-end development, etc. Here, JVM, JRE, and JDK play a crucial role in the development
process with Java. Before getting a detailed knowledge of this language, we must know the
significant difference between JDK, JRE, and JVM. In this article, we will discuss the same. But
first, let’s get a brief overview of them individually.r

What is JDK?
JDK is an abbreviation for Java Development Kit. It is an environment of software development
used for developing applets and Java applications. JDK has a physical existence, and it contains
JRE + development tools. One can easily install more than one version of JDK on the same
computer. The Java developers can make use of it on macOS, Windows, Linux, and Solaris. JDK
assists them in coding and running the Java programs.

It is an implementation of any of the given Java Platforms that the Oracle Corporation released:

Micro Edition
Enterprise Edition
Standard Edition
The JDK consists of a private JVM (Java Virtual Machine) along with a few other resources, java
(a loader/interpreter), like javac (a compiler), Javadoc (a documentation generator), jar (an
archiver), etc., for completing the process of Java application development.

What is JRE?
JRE stands for Java Runtime Environment- also written as Java RTE. It is a set of software tools
designed for running other software. It is an implementation of JVM, and JRE provides a runtime
environment. In short, a user needs JRE to run any Java program. If not a programmer, the user
doesn’t need to install the JDK- JRE alone will help run the Java programs.

All the versions of JDK come bundled up with the JRE (Java Runtime Environment). This way, a
user doesn’t have to download and install JRE on their PC separately. The JRE also exists
physically. It consists of a library set + a few more files that the JVM (Java Virtual Machine)
deploys at the runtime.

What is JVM?
JVM stands for Java Virtual Machine. It provides a runtime environment for driving Java
applications or code. JVM is an abstract machine that converts the Java bytecode into a machine
language. It is also capable of running the programs written by programmers in other languages
(compiled to the Java bytecode). The JVM is also known as a virtual machine as it does not exist
physically.

JVM is essentially a part of the JRE (Java Run Environment). You cannot separately download
and install it. You first need to install the JRE to install the JVM. It is available for many software
and hardware platforms. In various distinct programming languages, the compiler functions to
produce machine code for specific systems. However, only the Java compiler produces code for a
virtual machine- also known as JVM.

All three, JDK, JRE, and JVM, are dependent. It is because each Operating System’s (OS)
condition is different from one another. But Java is independent of the platform. The JVM has
three notions: implementation, instance, and specification.

JVM primarily performs the following tasks:


Provides runtime environment
Verifies code
Loads code
Executes code

Difference Between JDK, JRE, and JVM

Parameter JDK JRE JVM

Full-Form The JDK is an abbreviation The JRE is an abbreviation for The JVM is an abbreviation
for Java Development Kit. Java Runtime Environment. for Java Virtual Machine.

Definition The JDK (Java Development The Java Runtime The Java Virtual Machine
Kit) is a software Environment (JRE) is an (JVM) is a platform-
development kit that implementation of JVM. It is a independent abstract
develops applications in type of software package that machine that has three
Java. Along with JRE, the provides class libraries of notions in the form of
JDK also consists of various Java, JVM, and various other specifications. This
development tools (Java components for running the document describes the
Debugger, JavaDoc, applications written in Java requirement of JVM
compilers, etc.) programming. implementation.

Functionality The JDK primarily assists in JRE has a major responsibility JVM specifies all of the
executing codes. It primarily for creating an environment implementations. It is
functions in development. for the execution of code. responsible for providing all
of these implementations to
the JRE.

Platform The JDK is platform- JRE, just like JDK, is also The JVM is platform-
Dependency dependent. It means that for platform-dependent. It means independent. It means that
every different platform, you that for every different you won’t require a different
require a different JDK. platform, you require a JVM for every different
different JRE. platform.

Tools Since JDK is primarily JRE, on the other hand, does JVM does not consist of any
responsible for the not consist of any tool- like a tools for software
development, it consists of debugger, compiler, etc. It development.
various tools for debugging, rather contains various
monitoring, and developing supporting files for JVM, and
java applications. the class libraries that help
JVM in running the program.

Implementation JDK = Development Tools + JRE = Libraries for running JVM = Only the runtime
JRE (Java Runtime the application + JVM (Java environment that helps in
Environment) Virtual Machine) executing the Java bytecode.

Why Use It? Why use JDK? Why use JRE? Why use JVM?
Some crucial reasons to use Some crucial reasons to use Some crucial reasons to use
JDK are: JRE are: JVM are:
It consists of various If a user wants to run It provides its users
tools required for the Java applets, then with a platform-
writing Java they must install JRE independent way
programs. on their system. for executing the
JDK also contains The JRE consists of Java source code.
JRE for executing class libraries along JVM consists of
Java programs. with JVM and its various tools,
It includes an supporting files. It has libraries, and
Appletviewer, Java no other tools like a multiple
application launcher, compiler or a frameworks.
compiler, etc. debugger for Java The JVM also
development. comes with a Just-
The compiler helps
in converting the JRE uses crucial in-Time (JIT)
code written in Java package classes like compiler for
into bytecodes. util, math, awt, lang, converting the Java
and various runtime source code into a
The Java application libraries. low-level machine
launcher helps in language. Thus, it
opening a JRE. It ultimately runs
then loads all of the faster than any
necessary details and regular application.
then executes all of
its main methods. Once you run the
Java program, you
can run JVM on
any given platform
to save your time.

Features Features of JDK Features of JRE Features of JVM


Here are a few crucial
Here are a few Here are a few crucial features of JVM:
crucial features of features of JRE:
JDK: It is a set of tools that The JVM enables a
It has all the features actually helps the user to run
that JRE does. JVM to run. applications on
their device or in a
JDK enables a user The JRE also consists cloud environment.
to handle multiple of deployment
extensions in only technology. It It helps in
one catch block. includes Java Plug-in converting the
and Java Web Start as bytecode into
It basically provides machine-specific
an environment for well.
code.
developing and A developer can
executing the Java easily run a source JVM also provides
source code. code in JRE. But it some basic Java
does not allow them functions, such as
It has various garbage collection,
development tools to write and compile
the concerned Java security, memory
like the debugger, management, and
compiler, etc. program.
many more.
One can use the JRE also contains
various integration It uses a library
Diamond operator to along with the files
specify a generic libraries like the
JDBC (Java Database given by JRE (Java
interface in place of Runtime
writing the exact Connectivity), JNDI
(Java Naming and Environment) for
one. running the
Directory Interface),
Any user can easily RMI (Remote Method program.
install JDK on Unix, Invocation), and many Both JRE and JDK
Mac, and Windows more. contain JVM.
OS (Operating It consists of the JVM
Systems). It is easily
and virtual machine customizable. For
client for Java instance, a user can
HotSpot. feasibly allocate a
maximum and
minimum memory
to it.
JVM can also
execute a Java
program line by
line. It is thus also
known as an
interpreter.
JVM is also
independent of the
OS and hardware. It
means that once a
user writes a Java
program, they can
easily run it
anywhere.

ence Between JDK, JRE, and JVDddnce

You might also like