SlideShare una empresa de Scribd logo
1 de 23
Descargar para leer sin conexión
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.
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

Más contenido relacionado

La actualidad más candente (20)

Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
JVM
JVMJVM
JVM
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentation
 
Java introduction with JVM architecture
Java introduction with JVM architectureJava introduction with JVM architecture
Java introduction with JVM architecture
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Jvm
JvmJvm
Jvm
 
Java architecture
Java architectureJava architecture
Java architecture
 
What's Inside a JVM?
What's Inside a JVM?What's Inside a JVM?
What's Inside a JVM?
 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
Java Virtual Machine
Java Virtual MachineJava Virtual Machine
Java Virtual Machine
 
JVM
JVMJVM
JVM
 
Jvm internal detail
Jvm internal detailJvm internal detail
Jvm internal detail
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVMJava Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
 
JVM, JRE and Javac are the main part for the java program
 JVM, JRE and Javac are the main part for the java program JVM, JRE and Javac are the main part for the java program
JVM, JRE and Javac are the main part for the java program
 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 
The Real Thing: Java Virtual Machine
The Real Thing: Java Virtual MachineThe Real Thing: Java Virtual Machine
The Real Thing: Java Virtual Machine
 

Similar a Advanced java training in bangalore (20)

Java unit 1
Java unit 1Java unit 1
Java unit 1
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdf
 
Jvm
JvmJvm
Jvm
 
Java introduction
Java introductionJava introduction
Java introduction
 
JAVA for Every one
JAVA for Every oneJAVA for Every one
JAVA for Every one
 
Java JDK.docx
Java JDK.docxJava JDK.docx
Java JDK.docx
 
Ijaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderIjaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinder
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Basic Java I
Basic Java IBasic Java I
Basic Java I
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machine
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorial
 
java intro.pptx
java intro.pptxjava intro.pptx
java intro.pptx
 
A begineers guide of JAVA - Getting Started
 A begineers guide of JAVA - Getting Started A begineers guide of JAVA - Getting Started
A begineers guide of JAVA - Getting Started
 
Javanotes ww8
Javanotes ww8Javanotes ww8
Javanotes ww8
 
Java notes
Java notesJava notes
Java notes
 
JVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdfJVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdf
 
Java lab zero lecture
Java  lab  zero lectureJava  lab  zero lecture
Java lab zero lecture
 
Java Introduction | PDF
Java Introduction |  PDFJava Introduction |  PDF
Java Introduction | PDF
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

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.
  • 9.
  • 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