SlideShare a Scribd company logo
Working of
Java Virtual Machine
(JVM )
in Java ...
To write and execute a program
we need the following :
1) Editor – To type a program into, for example
notepad, notepad++ etc.
2) Compiler – To convert high level language
program into machine code Advanced Java
Training in Bangalore
3) Linker – To combine different program files
reference in your main program together.
4) Loader – To load the files from the secondary
storage device like Hard Disk, Flash Drive , CD into
RAM for execution. The loading is automatically
done when we execute our code.
5) Execution – Actual execution of the program
which is handled by OS(Operating System) &
processor.
Java code
compilation
and execution :
Java Training Center Bangalore
[1] Once we write a program , we have to save with
the class name.java.
[2] Once we execute a program .java file converts
into .class file
[3] JVM convert the .class file into machine code.
[4] JVM divide the memory into stack and memory
memory.
[4] Then JVM call the class loader , class loader go
back to the main class and find the all stack
members and load into heap memory.
[5] Again control go back java course in bangalore
to the JVM , it loads the all static members
into stack.
[6] Then it try to identifies the main method and
start the execution.
[7] If main method is not there , then it will
through the error and execution will stop.
[8] Once execution done JVM call garbage
collector to clear the memory.
Advanced java training in bangalore
What is JVM ?
JVM is known as Java Virtual
Machine.
It is the engine that executes the
Java Code.
It converts bytecode into machines
code. Java/j2ee classes bangalore
1) Java compiler produces code for a Virtual
Machine.
2) JVM compiled java code into bytecode. This
bytecode gets interpreted on machines
3) Between host system and Java Bytecode is an
intermediate language.
4) JVM is responsible for allocating a memory
space.
JVM
Architecture :
[1] Classloader:
Classloader www.aspendailynews.comis a
subsystem of JVM which is used to load the
class files into the memory.
Best core java training in bangalore
[2] Class Area(Method Area):
Class Area stores per-class structures such as
the runtime constant pool, fields and
methods, code for methods.
[3] Stack:
Java Stack stores frames.It holds local variables
and partial results, and plays a part in method
invocation and return.
[4] Native Method Stack:
Native Method Stack contains all the native
methods used in the application.
[5] Heap:
Heap is the runtime data area in which objects
are allocated and stored.
[6] Program Counter Register:
PC (program counter) register contains the address
of the Java virtual machine instruction currently
being executed.
[7] Execution Engine :
Execution Engine contains
i) A virtual processor
ii) Interpreter: Read bytecode stream then execute
the instructions.
iii) Just-In-Time(JIT) compiler: It is used to improve
the performance.
Working of
JVM:
The JVM performs following
works : Advanced java training in
bangalore
1) Loads the java code
2) Verifies the code
3) Executes the code
4) Provides runtime environment
Java is both compiled
and interpreted
language :
Compiler :
A compiler is a program which converts a
program from one level of language to another.
Example conversion of C++ program into
machine code. java/j2ee classes bangalore
The java compiler convert high level java code
into bytecode .
Interpreter :
A interpreter is a program which converts a
program at one level to another programming
language at the same level.
In Java , the JVM converts the bytecode into
the native machine code
Join
Infocampus Software Training Institute
for
Core & Advanced Java Training
and
get 100% career assistance with...
-> 4 Days free demo classes.
-> Complete practical session.
-> Work on real time project.
For the free demo classes ->
Call At :
9738001024
To know the syllabus of Java Course &
to getting a job easily :->
Enquire At :
http://www.infocampus.co.in/java-training-
bangalore.html
THANK
YOU

More Related Content

PPT
JVM- Java Virtual Machine
PPTX
Architecture diagram of jvm
PPT
Java-java virtual machine
PDF
Java Virtual Machine - Internal Architecture
PPTX
QSpiders - Memory (JVM architecture)
PPTX
Java Virtual Machine
JVM- Java Virtual Machine
Architecture diagram of jvm
Java-java virtual machine
Java Virtual Machine - Internal Architecture
QSpiders - Memory (JVM architecture)
Java Virtual Machine

What's hot (19)

PPTX
Java virtual machine
PPTX
Java byte code presentation
PDF
Java introduction with JVM architecture
PPTX
Java virtual machine
PPTX
Java architecture
PDF
What's Inside a JVM?
DOCX
JDK,JRE,JVM
PPTX
Jvm Architecture
PPTX
QSpiders - Jdk Jvm Jre and Jit
PPT
Java Virtual Machine
PDF
Jvm internal detail
PPTX
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
PDF
JVM, JRE and Javac are the main part for the java program
PPTX
Jdk,jre,jvm
PPTX
Inside the jvm
PDF
The Real Thing: Java Virtual Machine
Java virtual machine
Java byte code presentation
Java introduction with JVM architecture
Java virtual machine
Java architecture
What's Inside a JVM?
JDK,JRE,JVM
Jvm Architecture
QSpiders - Jdk Jvm Jre and Jit
Java Virtual Machine
Jvm internal detail
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
JVM, JRE and Javac are the main part for the java program
Jdk,jre,jvm
Inside the jvm
The Real Thing: Java Virtual Machine
Ad

Similar to Advanced java training in bangalore (20)

PPTX
PPTX
Java Programming Environment,JDK,JRE,JVM.pptx
PPTX
Introduction to Java Programming
PPTX
Java byte code & virtual machine
PDF
JAVA Program Examples
DOCX
Java JDK.docx
PPTX
Introduction of jvm|Java Training In Jaipur | Java Training Jaipur | Java Tra...
PPTX
Java introduction
PPTX
Lecture java variable , data type, token
PDF
Java introduction
PDF
JVM Architecture – How It Works.pdf
PPTX
What is Java? Presentation On Introduction To Core Java By PSK Technologies
Java Programming Environment,JDK,JRE,JVM.pptx
Introduction to Java Programming
Java byte code & virtual machine
JAVA Program Examples
Java JDK.docx
Introduction of jvm|Java Training In Jaipur | Java Training Jaipur | Java Tra...
Java introduction
Lecture java variable , data type, token
Java introduction
JVM Architecture – How It Works.pdf
What is Java? Presentation On Introduction To Core Java By PSK Technologies
Ad

Recently uploaded (20)

PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
August Patch Tuesday
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Hybrid model detection and classification of lung cancer
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
The various Industrial Revolutions .pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PPT
What is a Computer? Input Devices /output devices
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Architecture types and enterprise applications.pdf
WOOl fibre morphology and structure.pdf for textiles
August Patch Tuesday
Zenith AI: Advanced Artificial Intelligence
Hybrid model detection and classification of lung cancer
gpt5_lecture_notes_comprehensive_20250812015547.pdf
DP Operators-handbook-extract for the Mautical Institute
A contest of sentiment analysis: k-nearest neighbor versus neural network
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
STKI Israel Market Study 2025 version august
NewMind AI Weekly Chronicles - August'25-Week II
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Module 1.ppt Iot fundamentals and Architecture
Enhancing emotion recognition model for a student engagement use case through...
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
The various Industrial Revolutions .pptx
Web App vs Mobile App What Should You Build First.pdf
What is a Computer? Input Devices /output devices
Developing a website for English-speaking practice to English as a foreign la...
Architecture types and enterprise applications.pdf

Advanced java training in bangalore

  • 1. Working of Java Virtual Machine (JVM ) in Java ...
  • 2. To write and execute a program we need the following : 1) Editor – To type a program into, for example notepad, notepad++ etc. 2) Compiler – To convert high level language program into machine code Advanced Java Training in Bangalore
  • 3. 3) Linker – To combine different program files reference in your main program together. 4) Loader – To load the files from the secondary storage device like Hard Disk, Flash Drive , CD into RAM for execution. The loading is automatically done when we execute our code. 5) Execution – Actual execution of the program which is handled by OS(Operating System) & processor.
  • 6. [1] Once we write a program , we have to save with the class name.java. [2] Once we execute a program .java file converts into .class file [3] JVM convert the .class file into machine code. [4] JVM divide the memory into stack and memory memory.
  • 7. [4] Then JVM call the class loader , class loader go back to the main class and find the all stack members and load into heap memory. [5] Again control go back java course in bangalore to the JVM , it loads the all static members into stack. [6] Then it try to identifies the main method and start the execution.
  • 8. [7] If main method is not there , then it will through the error and execution will stop. [8] Once execution done JVM call garbage collector to clear the memory.
  • 10. What is JVM ? JVM is known as Java Virtual Machine. It is the engine that executes the Java Code. It converts bytecode into machines code. Java/j2ee classes bangalore
  • 11. 1) Java compiler produces code for a Virtual Machine. 2) JVM compiled java code into bytecode. This bytecode gets interpreted on machines 3) Between host system and Java Bytecode is an intermediate language. 4) JVM is responsible for allocating a memory space.
  • 13. [1] Classloader: Classloader www.aspendailynews.comis a subsystem of JVM which is used to load the class files into the memory. Best core java training in bangalore [2] Class Area(Method Area): Class Area stores per-class structures such as the runtime constant pool, fields and methods, code for methods.
  • 14. [3] Stack: Java Stack stores frames.It holds local variables and partial results, and plays a part in method invocation and return. [4] Native Method Stack: Native Method Stack contains all the native methods used in the application. [5] Heap: Heap is the runtime data area in which objects are allocated and stored.
  • 15. [6] Program Counter Register: PC (program counter) register contains the address of the Java virtual machine instruction currently being executed. [7] Execution Engine : Execution Engine contains i) A virtual processor ii) Interpreter: Read bytecode stream then execute the instructions. iii) Just-In-Time(JIT) compiler: It is used to improve the performance.
  • 17. The JVM performs following works : Advanced java training in bangalore 1) Loads the java code 2) Verifies the code 3) Executes the code 4) Provides runtime environment
  • 18. Java is both compiled and interpreted language :
  • 19. Compiler : A compiler is a program which converts a program from one level of language to another. Example conversion of C++ program into machine code. java/j2ee classes bangalore The java compiler convert high level java code into bytecode .
  • 20. Interpreter : A interpreter is a program which converts a program at one level to another programming language at the same level. In Java , the JVM converts the bytecode into the native machine code
  • 21. Join Infocampus Software Training Institute for Core & Advanced Java Training and get 100% career assistance with... -> 4 Days free demo classes. -> Complete practical session. -> Work on real time project.
  • 22. For the free demo classes -> Call At : 9738001024 To know the syllabus of Java Course & to getting a job easily :-> Enquire At : http://www.infocampus.co.in/java-training- bangalore.html