Internal working JVM

ShubhamGupta345141 287 views 12 slides Aug 07, 2022
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

JDK ,JRE and JVM
internal working of JVM


Slide Content

Difference JDK,
JRE & JVM
Internal working
of JVM
PRESENTED BY
NAME:SHUBHAM GUPTA
UNIVERSITY ROLLNO:12000221054
BRANCH:INFORMATION TECHNOLOGY

DIFFERENCE JDK,JRE & JVM

JDK( JavaDevelopmentKit )
JavaDevelopmentKitcanbeconsideredas
the super-set of JRE.JDK includes all features
that JRE has and over and above it contains
developmenttoolssuchlikecompiler, debugger
etc.(Java Development Kit) is a Kit that provides
the environment todevelop and
execute(run)the Java program.
JDK is a kit(or package) that includes two things
Development Tools(to provide an environment
to develop your java programs)
JRE (to execute your java program).

JRE(JavaRuntimeEnvironment)
JavaRuntimeEnvironment(JRE)iswithin
whichthejavavirtualmachineactually
runs.JREcontainsJavavirtualMachine
andotherfilesexceptdevelopmenttools
(debuggerandcompiler).Sodeveloper
canrunthesourcecodeinJREbut
he/shecannotdevelopandcompilethe
code.

JVM (JavaVirtualMachine)
JVM(Java Virtual Machine)is a very
important part of both JDK and JRE because
it is contained or inbuilt in both. Whatever
Java program you run using JRE or JDK
goes into JVM and JVM is responsible for
executing the java program line by line,
hence it is also known as aninterpreter

Interrelationship

INTERNAL WORKING OF
JVM(JAVA VIRTUAL MACHINE)

JAVA VIRTUAL MACHINE(JVM)
JVM becomes an instance of JRE at the runtime of a Java
program. It is widely known as a runtime interpreter.JVM
largely helps in the abstraction of inner implementation
from the programmers who make use of libraries for their
programs from JDK.
It is mainly responsible for three activities.
1.Loading
2.Linking
3.Initialization

WORKING OF JVM
JVM(Java Virtual Machine) behaves as a run-time engine to run
Java applications. JVM calls the main method present in Java
code.
Java Virtual machine(JVM) is a part of the JRE(Java Runtime
Environment).
Java applications are WORA (Write Once Run Anywhere). This
means that we need to write the Java programs just once,
which we can run on different platforms without making
changes in the Java program.
When we compile a .java file, the compiler generates the
.class files(contains byte-code) with the same names as that of
the class present in a .java file.
When we run a .class file, it goes through various steps.

HOW JVM WORKS

PROCEDURE
•Afterreading.classfile,classloadersavethecorresponding
byte codeinthemethodarea.GenerallyallJVMshaveonly
onemethod area whichissharedacrossclasseswhichholds
informationrelated toeach .classfile.
•Heapisan integralpartofJVMmemoryinwhichthe
objects actually rests.JVMproducestheClassobjectfor
each.classfile.
•UnlikeHeap,Stackisusedforstoringtemporaryvariables.
•PC-Registersusedtokeepexactinformationof all
instructions (whichinstructionisexecutingand which is
goingtobeexecuted).
•AnativemethodusedtoaccesstheruntimedataoftheJVM
(java virtualmachine).NativeMethodinterfaceenablesjava
codetocall bythenativeapplications (programsthatare
specifictothe hardwareand OS).

THANK YOU