Programming in Java
Mrs. Sneha D. Patil
Assistant Professor
(E&C Department)
Index
Java and world wide web
Java Run time Environment
JVM Architecture
Class loader subsystem
JVM memory
Java and world wide web
Java run time
Environment
The Java Runtime
Environment, or JRE, is a
software layer that runs on top
of a
computer’s operating system
software
and provides the class libraries
and other resources that a
specific Java program requires to
run.
The JRE is one of three
interrelated components for
developing and running Java
programs.
JVM
ARCHITECTURE
JVM(Java Virtual Machine) acts as
a run-time engine to run Java
applications. JVM is the one that
actually calls the main method
present in a Java code. JVM is a
part of JRE(Java Runtime
Environment).
Java applications are called
WORA (Write Once Run
Anywhere).This means a
programmer can develop Java
code on one system and can
expect it to run on any other Java-
enabled system without any
adjustment.This is all possible
because of JVM.
JVM DIAGRAM
Class Loader Subsystem
It is mainly responsible
for three activities.
Loading
Linking
Initialization
JVM Memory
Method area: In the method area, all class level
information like class name, immediate parent class
name, methods and variables information etc. are
stored, including static variables.There is only one
method area per JVM, and it is a shared resource.
Heap area: Information of all objects is stored in
the heap area. There is also one Heap Area per JVM.
It is also a shared resource.
Stack area: For every thread, JVM creates one run-
time stack which is stored here. Every block of this
stack is called activation record/stack frame which
stores methods calls. All local variables of that
method are stored in their corresponding frame. After
a thread terminates, its run-time stack will be
destroyed by JVM. It is not a shared resource.
PC Registers: Store address of current execution
instruction of a thread. Obviously, each thread has
separate PC Registers.
Native method stacks: For every thread, a
separate native stack is created. It stores native
method information.
Thank
To be continue….
you………