Understanding JDK,JRE and JVM

Pradip ValaPradip Vala
1 min read

Table of contents

JDK

The JDK is software development kit that provides the tools and libraries necessary to develop java applications,

It includes the JRE, as well as development tools like the Java compiler(javac), java documentation tool(javadoc) and various utilities (debugging and monitoring) that assist in java development.

JRE

The JRE is what you need to run java program. It contains the JVM and all the class libraries required to run java applications, but it does not include tools for compiling or debugging code. It’s used when you only want to run java program, not to develop them.

JVM

Java virtual machine which provides runtime environment to in which java bytecode can be executed.

It is platform-independent, meaning the same java byte code can run on any device that has a JVM.

Key functions:

1.Loads: The JVM loads the .class files(bytecode)

2.Verifies: it verifies the bytecode to ensure it is safe to execute

3.Interprets/Compile: The JVM either interprets bytecode (execute it line by line) or uses Just-In-Time (JIT) compilation to convert bytecode into machine code for execution.

4.Manage Memory: Through garbage collection, it automatically manages memory allocation and deallocation.

0
Subscribe to my newsletter

Read articles from Pradip Vala directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pradip Vala
Pradip Vala