SlideShare a Scribd company logo
Java virtual machine
Sanooja Jabbar T
pinjut@gmail.com
www.facebook.com/sanooja jabbar
twitter.com/username
in.linkedin.com/in/profilename
+91-9895519936
Typing Speed: 34wpm
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
Virtual Machine
“A virtual machine is a layer of abstraction that gives a
program, one simplified interface for interacting with a
variety of physical computers and their operating systems.”
Java Virtual Machine
• JVM is not a real hardware machine but a software layer which resembles
an hardware platform.
• JVM converts Java byte code into machine language and executes it.
• The byte code can be executed on any platform where there exist JVM.
• JVM‘s are available for many hardware and software platforms.
• The use of the same byte code for all JVM’s on all platforms allows Java to
be described as a "write once, run anywhere" programming language.
• Thus, the JVM is a crucial component of the Java platform.
Diagram Of JVM
Java
Source
Code(.java)
Java
Object
Code(.class)
Java Compiler
(javac)
Computer
Operating System
Java Interpreter
Java Virtual Machine
Object Code is loaded into
Java Virtual Machine
Components Of JVM
Class Loader Execution Engine
Run-time data areas
Java Virtual Machine
.class file
Components Of JVM
1. Byte code verifier
2. Class loader
3. Execution engine
4. Garbage collector
5. Security Manager
1. Byte code Verifier:
• Byte code verifier is used to verify the byte code.
• Also checks for unusual code.
• So it is a crucial component for security.
2. Class loader:
• Class loader loads java classes into java virtual machine and creates
the instance of java.lang.class.
• The main feature is that JVM doesn’t need to have any knowledge
about the classes that will be loaded at runtime.
• It performs three main functions of JVM, namely: loading, linking
and initialization
3. Execution Engine:
• The execution engine helps JVM to convert bytecode into machine code.
• It has two parts:
a) Interpreter
b) Just-in-time-interpreter
• Execution engine is responsible for executing the instructions contained in
the methods of loaded classes.
4. Garbage Collector:
• Garbage collection is the process of automatically freeing objects that are
no longer referenced by the program.
• It periodically check for the object on heap , whose link is broken so it can
collect garbage from heap.
• Garbage collection relieves java programmer from memory management.
5. Security Manager:
• Security manager constantly monitors the code.
• It is a special java object that is responsible for guarding security policies
for java applications.
• It is always consulted before any potentially dangerous operation is
requested by a java application.
JDK ‘n’ JRE
Diagram to show the
relations between JVM,
JRE & JDK
Java Runtime Environment(JRE):
• Provides the libraries, the Java Virtual Machine, and other components to
run applets and applications written in the Java programming language.
• The JRE does not contain tools and utilities such as compilers or
debuggers for developing applets and applications.
Java Development Kit(JDK):
• JDK is a bundle of software that is used to develop Java based
applications.
• The JDK is a superset of the JRE, and contains everything that is in the
JRE, plus set of API classes, Java compiler and debugger, and additional
files needed to write Java applets and applications.
• Needs more disk space than JRE
Just In Time(JIT):
• JIT are advanced part of Java Virtual machine
• It optimize byte code to machine instruction conversion by compiling
similar byte codes at same time
• Thus reducing overall execution time.
• JIT performs several optimizations such as in-lining function.
• JIT compiler improves performance
In Short....
• Java Virtual Machine (JVM) is platform dependent.
• Java is platform independent.
• JVM does not really exists but is created within another environment.
• The JVM stands on top of the operating system (OS).
Is
Java a
Compiled or Interpreted
Language
Java is both compiled and interpreted
language.
Java compiles using javac and JIT, and
interprets using Java virtual machine.
“From Writingto
Execution”
1
2
“Programmer write source code and store that
into a .java file.”
Note: Name of your Java source file must be same
with the public class declared inside that file, for
example if there is public class called Order inside
Java file, then it name must be Order.java
“javac compiles .java fie and creates
class files, which contains byte code”
3
4
“JVM executes these class files and gathers
statistics of execution run.”
“When JVM has enough data to make decision, JIT
compiles frequently used byte codes into native
code, which is then directly executed by platform.
This is how JIT provides performance boost to
Java application.”
Any Doubts...???
Thanks For
Listening...
The End
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course
@ baabtra.com
We put industry standards to practice. Our structured, activity based courses are so designed
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Cafit Square,
Hilite Business Park,
Near Pantheerankavu,
Kozhikode
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
Ad

More Related Content

What's hot (20)

Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwords
ramesh517
 
Static Members-Java.pptx
Static Members-Java.pptxStatic Members-Java.pptx
Static Members-Java.pptx
ADDAGIRIVENKATARAVIC
 
History Of JAVA
History Of JAVAHistory Of JAVA
History Of JAVA
ARSLANAHMED107
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
Sujit Majety
 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
Kritika Goel
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
Fu Cheng
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
shalinikarunakaran1
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Sandeep Rawat
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
ParminderKundu
 
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...
Mr. Akaash
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
 
Java presentation
Java presentation Java presentation
Java presentation
Programming Talents
 
Data types
Data typesData types
Data types
myrajendra
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machine
Laxman Puri
 
Java Threads
Java ThreadsJava Threads
Java Threads
M Vishnuvardhan Reddy
 
Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
shashi shekhar
 
Java and its features
Java and its featuresJava and its features
Java and its features
Pydi Nikhil
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Elizabeth alexander
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
Mahika Tutorials
 

Viewers also liked (20)

JVM- Java Virtual Machine
JVM- Java Virtual MachineJVM- Java Virtual Machine
JVM- Java Virtual Machine
Manasvi Mehta
 
JVM
JVMJVM
JVM
Prity Bhudolia
 
Understanding JVM
Understanding JVMUnderstanding JVM
Understanding JVM
Aparna Chaudhary
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
Qspiders - Software Testing Training Institute
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
home
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
Dhanith Krishna
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
ThirupathiReddy Vajjala
 
On Reflection in OO Programming Languages (v1.5.2, 14/04/14)
On Reflection in OO Programming Languages (v1.5.2, 14/04/14)On Reflection in OO Programming Languages (v1.5.2, 14/04/14)
On Reflection in OO Programming Languages (v1.5.2, 14/04/14)
Yann-Gaël Guéhéneuc
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
Niyitegekabilly
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
Benjamin Kim
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
Vladislav Gangan
 
What's Inside a JVM?
What's Inside a JVM?What's Inside a JVM?
What's Inside a JVM?
Azul Systems Inc.
 
Reflection in java
Reflection in javaReflection in java
Reflection in java
upen.rockin
 
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIsCS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
CS6270 Virtual Machines - Java Virtual Machine Architecture and APIs
Kwangshin Oh
 
Java Multi Thead Programming
Java Multi Thead ProgrammingJava Multi Thead Programming
Java Multi Thead Programming
Nishant Mevawala
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in Java
Abhishek Asthana
 
Threads concept in java
Threads concept in javaThreads concept in java
Threads concept in java
Muthukumaran Subramanian
 
Java beans
Java beansJava beans
Java beans
Ravi Kant Sahu
 
QSpiders - Variable Length-Subnet-Masks
QSpiders - Variable Length-Subnet-MasksQSpiders - Variable Length-Subnet-Masks
QSpiders - Variable Length-Subnet-Masks
Qspiders - Software Testing Training Institute
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And Multithreading
Shraddha
 
Ad

Similar to Java virtual machine (20)

Jvm
JvmJvm
Jvm
baabtra.com - No. 1 supplier of quality freshers
 
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptxJAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
10322210023
 
Jvm
JvmJvm
Jvm
baabtra.com - No. 1 supplier of quality freshers
 
JVM.pptx
JVM.pptxJVM.pptx
JVM.pptx
ParvathiPPSGRKCW
 
2 22CA026_Advance Java Programming_Data types and Operators.pptx
2 22CA026_Advance Java Programming_Data types and Operators.pptx2 22CA026_Advance Java Programming_Data types and Operators.pptx
2 22CA026_Advance Java Programming_Data types and Operators.pptx
dolphiverma80
 
Jvm
JvmJvm
Jvm
baabtra.com - No. 1 supplier of quality freshers
 
Jvm
JvmJvm
Jvm
baabtra.com - No. 1 supplier of quality freshers
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
BhargaviDalal3
 
java intro.pptx
java intro.pptxjava intro.pptx
java intro.pptx
MangaiyarkarasiDurai
 
Java introduction
Java introductionJava introduction
Java introduction
The icfai university jaipur
 
Javanotes ww8
Javanotes ww8Javanotes ww8
Javanotes ww8
kumar467
 
Java notes
Java notesJava notes
Java notes
Chaitanya Rajkumar Limmala
 
Object Oriented concept-JAVA-Module-1-PPT.pptx
Object Oriented concept-JAVA-Module-1-PPT.pptxObject Oriented concept-JAVA-Module-1-PPT.pptx
Object Oriented concept-JAVA-Module-1-PPT.pptx
ASHWINIGOWDA46
 
intoduction to java
intoduction to javaintoduction to java
intoduction to java
SIVASHANKARIRAJAN
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
SM Rasel
 
1 java introduction
1 java introduction1 java introduction
1 java introduction
abdullah al mahamud rosi
 
1 java intro
1 java intro1 java intro
1 java intro
abdullah al mahamud rosi
 
Jvm
JvmJvm
Jvm
Muhammed Thanveer M
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
Shipra Swati
 
Ad

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
baabtra.com - No. 1 supplier of quality freshers
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
baabtra.com - No. 1 supplier of quality freshers
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
baabtra.com - No. 1 supplier of quality freshers
 
Blue brain
Blue brainBlue brain
Blue brain
baabtra.com - No. 1 supplier of quality freshers
 
5g
5g5g
5g
baabtra.com - No. 1 supplier of quality freshers
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
baabtra.com - No. 1 supplier of quality freshers
 

Java virtual machine

  • 2. Sanooja Jabbar T [email protected] www.facebook.com/sanooja jabbar twitter.com/username in.linkedin.com/in/profilename +91-9895519936 Typing Speed: 34wpm
  • 3. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. Virtual Machine “A virtual machine is a layer of abstraction that gives a program, one simplified interface for interacting with a variety of physical computers and their operating systems.”
  • 5. Java Virtual Machine • JVM is not a real hardware machine but a software layer which resembles an hardware platform. • JVM converts Java byte code into machine language and executes it. • The byte code can be executed on any platform where there exist JVM. • JVM‘s are available for many hardware and software platforms. • The use of the same byte code for all JVM’s on all platforms allows Java to be described as a "write once, run anywhere" programming language. • Thus, the JVM is a crucial component of the Java platform.
  • 6. Diagram Of JVM Java Source Code(.java) Java Object Code(.class) Java Compiler (javac) Computer Operating System Java Interpreter Java Virtual Machine Object Code is loaded into Java Virtual Machine
  • 7. Components Of JVM Class Loader Execution Engine Run-time data areas Java Virtual Machine .class file
  • 8. Components Of JVM 1. Byte code verifier 2. Class loader 3. Execution engine 4. Garbage collector 5. Security Manager
  • 9. 1. Byte code Verifier: • Byte code verifier is used to verify the byte code. • Also checks for unusual code. • So it is a crucial component for security. 2. Class loader: • Class loader loads java classes into java virtual machine and creates the instance of java.lang.class. • The main feature is that JVM doesn’t need to have any knowledge about the classes that will be loaded at runtime. • It performs three main functions of JVM, namely: loading, linking and initialization
  • 10. 3. Execution Engine: • The execution engine helps JVM to convert bytecode into machine code. • It has two parts: a) Interpreter b) Just-in-time-interpreter • Execution engine is responsible for executing the instructions contained in the methods of loaded classes. 4. Garbage Collector: • Garbage collection is the process of automatically freeing objects that are no longer referenced by the program. • It periodically check for the object on heap , whose link is broken so it can collect garbage from heap. • Garbage collection relieves java programmer from memory management.
  • 11. 5. Security Manager: • Security manager constantly monitors the code. • It is a special java object that is responsible for guarding security policies for java applications. • It is always consulted before any potentially dangerous operation is requested by a java application.
  • 12. JDK ‘n’ JRE Diagram to show the relations between JVM, JRE & JDK
  • 13. Java Runtime Environment(JRE): • Provides the libraries, the Java Virtual Machine, and other components to run applets and applications written in the Java programming language. • The JRE does not contain tools and utilities such as compilers or debuggers for developing applets and applications. Java Development Kit(JDK): • JDK is a bundle of software that is used to develop Java based applications. • The JDK is a superset of the JRE, and contains everything that is in the JRE, plus set of API classes, Java compiler and debugger, and additional files needed to write Java applets and applications. • Needs more disk space than JRE
  • 14. Just In Time(JIT): • JIT are advanced part of Java Virtual machine • It optimize byte code to machine instruction conversion by compiling similar byte codes at same time • Thus reducing overall execution time. • JIT performs several optimizations such as in-lining function. • JIT compiler improves performance
  • 15. In Short.... • Java Virtual Machine (JVM) is platform dependent. • Java is platform independent. • JVM does not really exists but is created within another environment. • The JVM stands on top of the operating system (OS).
  • 16. Is Java a Compiled or Interpreted Language
  • 17. Java is both compiled and interpreted language. Java compiles using javac and JIT, and interprets using Java virtual machine.
  • 19. 1 2 “Programmer write source code and store that into a .java file.” Note: Name of your Java source file must be same with the public class declared inside that file, for example if there is public class called Order inside Java file, then it name must be Order.java “javac compiles .java fie and creates class files, which contains byte code”
  • 20. 3 4 “JVM executes these class files and gathers statistics of execution run.” “When JVM has enough data to make decision, JIT compiles frequently used byte codes into native code, which is then directly executed by platform. This is how JIT provides performance boost to Java application.”
  • 23. Want to learn more about programming or Looking to become a good programmer? Are you wasting time on searching so many contents online? Do you want to learn things quickly? Tired of spending huge amount of money to become a Software professional? Do an online course @ baabtra.com We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.
  • 24. Follow us @ twitter.com/baabtra Like us @ facebook.com/baabtra Subscribe to us @ youtube.com/baabtra Become a follower @ slideshare.net/BaabtraMentoringPartner Connect to us @ in.linkedin.com/in/baabtra Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 25. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: [email protected]

Editor's Notes

  • #5: Before understanding what is JVM let us first know what virtual machine is
  • #6: When you run a Java program, the OS is actually running the Java Runtime Engine, or JRE, as an executable program; it processes your compiled code through the Java Virtual Machine (usually referred to as the JVM).
  • #10: All Java virtual machines include one class loader that is embedded in the virtual machine. • The linking process consists of three sub-tasks, namely, verification, preparation, and resolution