0% found this document useful (0 votes)
27 views

Architectue of Java: 1. JDK, Jre and JVM 2. JVM

The document discusses the architecture of Java. It explains that the Java Development Kit (JDK) contains the Java Runtime Environment (JRE) which contains the Java Virtual Machine (JVM). The JVM allows Java programs to run on any platform and provides hardware and operating system independence. It loads, verifies, and executes code while providing a runtime environment. The internal architecture of the JVM includes components like the classloader, method area, heap, stacks, program counter registers, native method stacks, and execution engine which includes an interpreter and just-in-time compiler.

Uploaded by

Md Adil
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Architectue of Java: 1. JDK, Jre and JVM 2. JVM

The document discusses the architecture of Java. It explains that the Java Development Kit (JDK) contains the Java Runtime Environment (JRE) which contains the Java Virtual Machine (JVM). The JVM allows Java programs to run on any platform and provides hardware and operating system independence. It loads, verifies, and executes code while providing a runtime environment. The internal architecture of the JVM includes components like the classloader, method area, heap, stacks, program counter registers, native method stacks, and execution engine which includes an interpreter and just-in-time compiler.

Uploaded by

Md Adil
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ARCHITECTUE OF JAVA

Brief Outline:
1. JDK, JRE and JVM
2. JVM

JDK, JRE and JVM


What makes Java so unique? As already explained JVM is what makes Java platform and
architecture independent. It evens make Java more secure.

This figures helps show the Architecture of Java in details. How JRE(Java Runtime Environment)
along with Compiler, Debugger and Java Applet Viewer is a part of JDK(Java Development Kit),
that you might remember we had to download before we could compile our very first HelloWorld
java program.

JVM
JVM is contained in JRE(Java Runtime Environment) , JRE is collection of software package which
are required to runs the Java program. JVM is the most important part and cornerstone of the Java
platform. It is defined as the component and collection of technologies which are wholly
responsible for:
 Hardware
 Operating System Independence
 Small sized Code(mainly compiled)
 Security measures

JVM can be defined as -


• An abstract specification - it ensures single specification which help in inter-
operable(cross-platform operation) implementation.
• An implementation - a computer program or set of program the meets the requirement
specified in the JRE specifications.
• A runtime instance - Whenever you write java command on the command prompt to run
the java class, an instance of JVM is created.
What JVM does?
• It loads code
• It verifies code
• It executes code
• It provide runtime environment

Internal Architecture of JVM

It contains -
• Classloader - Classloader is a subsystem of JVM that is used to load class files.
• Method(Class) Area - Class(Method) Area stores per-class structures such as the runtime
constant pool, field and method data, the code for methods.
• Heap – It is the runtime data area in which objects are allocated.
• JVM Language Stacks – Java Stack stores frames which include local variables, partial
results and plays a part in method invocation and return. Each thread has a private JVM
stack, created at the same time as thread. A new frame is created each time a method is
invoked. A frame is destroyed when its method invocation completes.
• Program Counter Registers - PC (program counter) register. It contains the address of the
Java virtual machine instruction currently being executed.
• Native Method Stacks – It contains all the native methods used in the application.
• Execution Engine – It contains :
◦ A virtual processor
◦ Interpreter
◦ Just-In-Time(JIT) compiler - It is used to improve the performance. JIT compiles parts
of the byte code that have similar functionality at the same time, and hence reduces the
amount of time needed for compilation.

You might also like