JVM JRE JDK

Untitled

JVM, JRE, and JDK are platform-dependent because the configuration of each OS is different from each other. However, Java is platform-independent

The Java Virtual Machine

is a virtual “machine” that provides a runtime environment for Java applications and programs. Its role is simple: interpret and execute Java bytecode, which a low-level representation of the compiled form of a piece of Java code. When applications written in Java are compiled, they produce bytecode(.class file), which can be executed (or run) by any JVM implementation, regardless of the underlying architecture, hardware, or operating system.

What JVM does

Interpreting the Java bytecode

JRE(Java Runtime environment)

The Java Runtime Environment is a set of software tools that are used for developing Java applications. It is used to provide the runtime environment. It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that JVM uses at runtime.

Java Development Toolkit(JDK)

The JDK contains a private Java Virtual Machine (JVM) and a few other resources such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), etc. to complete the development of a Java Application

Architecture

Untitled

Thread and Process

Process

An instance of program that is getting executed. It has own resources like memory, thread, etc.