SlideShare une entreprise Scribd logo
1  sur  24
By: Nikhil
Sharma.
JAVA VIRTUAL
MACHINE(JVM)
Java Platform.
Editions of Java.
Big Picture of Java.
Java “Fanboi”.
What is JVM.
What JVM does.
Internal Architecture of
JVM.
Data Types of JVM.
Garbage Collection.
What is JDK & JRE.
Relation among JVM,
JDK & JRE.
Security Promises of
JVM.
INDEX
Java Platform is a suite of programs that
facilitate developing & running programs written
in java programming language.
The platform is not specific to any processor or
Operating System.
There are multiple platforms each targeting a
different class of devices.
JAVA PLATFORM
Java SE: It is the Java Standard Edition that
contains basic core java classes.
Java EE: It is the Java Enterprise Edition & it
contain classes that are beyond Java SE.
Java ME: It stands for Java Micro Edition for
developing codes for portable devices.
EDITIONS OF JAVA
BIG PICTURE OF JAVA
 Speaking of Java as a
language as opposed to the
JVM platform, James
Gosling, the Father of Java,
said "Most people talk about
Java the language, and this
may sound odd coming from
me, but I could hardly care
less."
 He went on to explain, "What
I really care about is the Java
Virtual Machine as a concept,
because that is the thing that
ties it all together."
JVM “FANBOI”
Java Virtual Machine is the heart of entire Java
program execution process.
It’s an abstract machine. It is a specification that
provides runtime environment in which java
bytecode can be executed.
JVM is platform dependent.
It is responsible for taking .class file &
converting each byte code instructions into the
machine language instruction that can be
executed by the microprocessor.
WHAT IS JVM
The JVM performs following operation—
Loads code.
Verifies code.
Executes code.
Provides Runtime Environment.
WHAT JVM DOES
First of all, it loads .class file into memory.
Then it verifies whether all byte code
instructions are proper or not. If it finds any
instruction suspicious, the execution is rejected
immediately.
If the byte instructions are proper, then it
allocates necessary memory to execute the
program.
STEPS UNDERTAKEN
INTERNAL ARCHITECTURE
OF JVM
Classloader: Classloader is a subsystem of JVM
that is used to load class files.
Method Area: Method area is the memory block,
which stores the class code, code of the
variables, and code of the method in java
programs.
Heap: It is the runtime data area in which
objects are allocated.
CONTD.
Java Stacks: Java stacks are memory area where
the java methods are executed. While executing
methods, a separate frame will be created in the
java stack, where the method is executed. JVM
uses separate threads(or process) to execute each
methods.
PC Registers: These are memory areas which
contains memory address of instructions of the
methods.
CONTD.
Native Method Stacks: It contains all the native
methods used in the applications. Native
methods are executed in these stacks.
Native Method Interface/Libraries: To execute
the native methods, generally native method
libraries are required. These header files are
located & connected to JVM by a program,
called Native method interface.
CONTD.
Execution Engine: Execution engine contains—
i. Interpreter.
ii. JIT(Just In Time) complier.
these are responsible for converting the byte
code instructions into machine code so that the
processor will execute them.
CONTD.
DATA TYPES OF JVM
STORAGE & COMPUTATION
TYPE INSIDE THE JVM
Each object consumes some memory, of which
all there is a limited area. Eventually, the
memory allocated to these objects must be
reclaimed when they aren’t used. The JVM
reclaims these objects automatically through a
process called Garbage collection.
An object is ready to be garbage collected when
it is no longer alive.
Garbage collector uses many algorithm but the
most commonly used algorithm is mark & sweep.
GARBAGE COLLECTION.
EXAMPLE OF GARBAGE
COLLECTOR
OUTPUT OF ABOVE CODING
JRE is an acronym for Java Runtime
Environment. It is used to provide runtime
environment. It is the implementation of JVM.
WHAT IS JRE
JDK is an acronym for Java Development Kit. It
physically exists. It contains JRE + development
tools.
WHAT IS JDK
RELATION AMONG JVM, JDK
& JRE.
 Every object is constructed exactly once before it is
used.
 Every local variable & field is initialized before it is
used.
 Final methods cannot be overridden, & final classes
cannot be sub classed.
 Many More..
The java platform security architecture depends on all the
promises & many more..
SECURITY PROMISES OF
JVM
Java virtual machine

Contenu connexe

Tendances

Tendances (20)

Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Packages in java
Packages in javaPackages in java
Packages in java
 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Exception handling in java
Exception handling  in javaException handling  in java
Exception handling in java
 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
 
JVM
JVMJVM
JVM
 
Java program structure
Java program structureJava program structure
Java program structure
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Spring jdbc
Spring jdbcSpring jdbc
Spring jdbc
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Java packages
Java packagesJava packages
Java packages
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Java database connectivity with MYSQL
Java database connectivity with MYSQLJava database connectivity with MYSQL
Java database connectivity with MYSQL
 

En vedette

Exception handling in java
Exception handling in javaException handling in java
Exception handling in java
priyankazope
 
Virtual Machine Performance
Virtual Machine PerformanceVirtual Machine Performance
Virtual Machine Performance
Qian Lin
 

En vedette (20)

Exception handling in java
Exception handling in javaException handling in java
Exception handling in java
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 
Performance Demystified for SQL Server on Azure Virtual Machines
Performance Demystified for SQL Server on Azure Virtual MachinesPerformance Demystified for SQL Server on Azure Virtual Machines
Performance Demystified for SQL Server on Azure Virtual Machines
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
 
Virtual Machine Performance
Virtual Machine PerformanceVirtual Machine Performance
Virtual Machine Performance
 
Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
The Real Thing: Java Virtual Machine
The Real Thing: Java Virtual MachineThe Real Thing: Java Virtual Machine
The Real Thing: Java Virtual Machine
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
 
Understanding JVM
Understanding JVMUnderstanding JVM
Understanding JVM
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
JVM- Java Virtual Machine
JVM- Java Virtual MachineJVM- Java Virtual Machine
JVM- Java Virtual Machine
 
Virtual machines and their architecture
Virtual machines and their architectureVirtual machines and their architecture
Virtual machines and their architecture
 
Virtual Machines
Virtual MachinesVirtual Machines
Virtual Machines
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Знакомство с Ethereum virtual machine
Знакомство с Ethereum virtual machineЗнакомство с Ethereum virtual machine
Знакомство с Ethereum virtual machine
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 

Similaire à Java virtual machine

Javanotes ww8
Javanotes ww8Javanotes ww8
Javanotes ww8
kumar467
 
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
Rakesh Madugula
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 

Similaire à Java virtual machine (20)

Basic Java I
Basic Java IBasic Java I
Basic Java I
 
Java JDK.docx
Java JDK.docxJava JDK.docx
Java JDK.docx
 
Javanotes ww8
Javanotes ww8Javanotes ww8
Javanotes ww8
 
Java notes
Java notesJava notes
Java notes
 
JAVA for Every one
JAVA for Every oneJAVA for Every one
JAVA for Every one
 
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
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
A Brief study on JVM A Brief study on JVM
A Brief study on JVM A Brief study on JVMA Brief study on JVM A Brief study on JVM
A Brief study on JVM A Brief study on JVM
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machine
 
JVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdfJVM Architecture – How It Works.pdf
JVM Architecture – How It Works.pdf
 
JVM.pptx
JVM.pptxJVM.pptx
JVM.pptx
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell You
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
Java the reason behind its never ending demand
Java the reason behind its never ending demandJava the reason behind its never ending demand
Java the reason behind its never ending demand
 
Java lab lecture 1
Java  lab  lecture 1Java  lab  lecture 1
Java lab lecture 1
 
Internal working JVM
Internal working JVMInternal working JVM
Internal working JVM
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
 

Dernier

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
Safe Software
 
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
panagenda
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 

Java virtual machine

  • 2. Java Platform. Editions of Java. Big Picture of Java. Java “Fanboi”. What is JVM. What JVM does. Internal Architecture of JVM. Data Types of JVM. Garbage Collection. What is JDK & JRE. Relation among JVM, JDK & JRE. Security Promises of JVM. INDEX
  • 3. Java Platform is a suite of programs that facilitate developing & running programs written in java programming language. The platform is not specific to any processor or Operating System. There are multiple platforms each targeting a different class of devices. JAVA PLATFORM
  • 4. Java SE: It is the Java Standard Edition that contains basic core java classes. Java EE: It is the Java Enterprise Edition & it contain classes that are beyond Java SE. Java ME: It stands for Java Micro Edition for developing codes for portable devices. EDITIONS OF JAVA
  • 6.  Speaking of Java as a language as opposed to the JVM platform, James Gosling, the Father of Java, said "Most people talk about Java the language, and this may sound odd coming from me, but I could hardly care less."  He went on to explain, "What I really care about is the Java Virtual Machine as a concept, because that is the thing that ties it all together." JVM “FANBOI”
  • 7. Java Virtual Machine is the heart of entire Java program execution process. It’s an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. JVM is platform dependent. It is responsible for taking .class file & converting each byte code instructions into the machine language instruction that can be executed by the microprocessor. WHAT IS JVM
  • 8. The JVM performs following operation— Loads code. Verifies code. Executes code. Provides Runtime Environment. WHAT JVM DOES
  • 9. First of all, it loads .class file into memory. Then it verifies whether all byte code instructions are proper or not. If it finds any instruction suspicious, the execution is rejected immediately. If the byte instructions are proper, then it allocates necessary memory to execute the program. STEPS UNDERTAKEN
  • 11. Classloader: Classloader is a subsystem of JVM that is used to load class files. Method Area: Method area is the memory block, which stores the class code, code of the variables, and code of the method in java programs. Heap: It is the runtime data area in which objects are allocated. CONTD.
  • 12. Java Stacks: Java stacks are memory area where the java methods are executed. While executing methods, a separate frame will be created in the java stack, where the method is executed. JVM uses separate threads(or process) to execute each methods. PC Registers: These are memory areas which contains memory address of instructions of the methods. CONTD.
  • 13. Native Method Stacks: It contains all the native methods used in the applications. Native methods are executed in these stacks. Native Method Interface/Libraries: To execute the native methods, generally native method libraries are required. These header files are located & connected to JVM by a program, called Native method interface. CONTD.
  • 14. Execution Engine: Execution engine contains— i. Interpreter. ii. JIT(Just In Time) complier. these are responsible for converting the byte code instructions into machine code so that the processor will execute them. CONTD.
  • 16. STORAGE & COMPUTATION TYPE INSIDE THE JVM
  • 17. Each object consumes some memory, of which all there is a limited area. Eventually, the memory allocated to these objects must be reclaimed when they aren’t used. The JVM reclaims these objects automatically through a process called Garbage collection. An object is ready to be garbage collected when it is no longer alive. Garbage collector uses many algorithm but the most commonly used algorithm is mark & sweep. GARBAGE COLLECTION.
  • 19. OUTPUT OF ABOVE CODING
  • 20. JRE is an acronym for Java Runtime Environment. It is used to provide runtime environment. It is the implementation of JVM. WHAT IS JRE
  • 21. JDK is an acronym for Java Development Kit. It physically exists. It contains JRE + development tools. WHAT IS JDK
  • 22. RELATION AMONG JVM, JDK & JRE.
  • 23.  Every object is constructed exactly once before it is used.  Every local variable & field is initialized before it is used.  Final methods cannot be overridden, & final classes cannot be sub classed.  Many More.. The java platform security architecture depends on all the promises & many more.. SECURITY PROMISES OF JVM