SlideShare a Scribd company logo
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

More Related Content

What's hot

Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
Elizabeth Thomas
 
Features of JAVA Programming Language.
Features of JAVA Programming Language.Features of JAVA Programming Language.
Features of JAVA Programming Language.
Bhautik Jethva
 
Java Virtual Machine - Internal Architecture
Java Virtual Machine - Internal ArchitectureJava Virtual Machine - Internal Architecture
Java Virtual Machine - Internal Architecture
subnesh
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Saba Ameer
 
Important features of java
Important features of javaImportant features of java
Important features of java
AL- AMIN
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Java Lover
 
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
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
Shravan Sanidhya
 
Java seminar
Java seminarJava seminar
Java seminar
devendrakhairwa
 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
Cognizant
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
shalinikarunakaran1
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
ThirupathiReddy Vajjala
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
SanSan149
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
mahir jain
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
Md. Tanvir Hossain
 
Java features
Java  features Java  features
Java features
Madishetty Prathibha
 
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
shamnasain
 
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
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
sonalikharade3
 

What's hot (20)

Features of java
Features of javaFeatures of java
Features of java
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Features of JAVA Programming Language.
Features of JAVA Programming Language.Features of JAVA Programming Language.
Features of JAVA Programming Language.
 
Java Virtual Machine - Internal Architecture
Java Virtual Machine - Internal ArchitectureJava Virtual Machine - Internal Architecture
Java Virtual Machine - Internal Architecture
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Important features of java
Important features of javaImportant features of java
Important features of java
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
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
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
 
Java seminar
Java seminarJava seminar
Java seminar
 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
Java features
Java  features Java  features
Java features
 
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
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
 

Viewers also liked

JVM- Java Virtual Machine
JVM- Java Virtual MachineJVM- Java Virtual Machine
JVM- Java Virtual Machine
Manasvi Mehta
 
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
 
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
 
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.
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
Nikhil Sharma
 
Reflection in java
Reflection in javaReflection in java
Reflection in javaupen.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
 
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
 
Threads in JAVA
Threads in JAVAThreads in JAVA

Viewers also liked (20)

JVM- Java Virtual Machine
JVM- Java Virtual MachineJVM- Java Virtual Machine
JVM- Java Virtual Machine
 
Understanding JVM
Understanding JVMUnderstanding JVM
Understanding JVM
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
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)
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
What's Inside a JVM?
What's Inside a JVM?What's Inside a JVM?
What's Inside a JVM?
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Reflection in java
Reflection in javaReflection in java
Reflection in java
 
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
 
Java Multi Thead Programming
Java Multi Thead ProgrammingJava Multi Thead Programming
Java Multi Thead Programming
 
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
 
Threads concept in java
Threads concept in javaThreads concept in java
Threads concept in java
 
Java beans
Java beansJava beans
Java beans
 
QSpiders - Variable Length-Subnet-Masks
QSpiders - Variable Length-Subnet-MasksQSpiders - Variable Length-Subnet-Masks
QSpiders - Variable Length-Subnet-Masks
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And Multithreading
 
Threads in JAVA
Threads in JAVAThreads in JAVA
Threads in JAVA
 

Similar to Java virtual machine

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
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
BhargaviDalal3
 
Java introduction
Java introductionJava introduction
Java introduction
The icfai university jaipur
 
Javanotes ww8
Javanotes ww8Javanotes ww8
Javanotes ww8kumar467
 
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
Jvm
JvmJvm
Java unit 1
Java unit 1Java unit 1
Java unit 1
Shipra Swati
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
kamal kotecha
 
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
Deepika Chaudhary
 

Similar to Java virtual machine (20)

Jvm
JvmJvm
Jvm
 
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
 
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
 
Jvm
JvmJvm
Jvm
 
JVM.pptx
JVM.pptxJVM.pptx
JVM.pptx
 
Jvm
JvmJvm
Jvm
 
Jvm
JvmJvm
Jvm
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
 
java intro.pptx
java intro.pptxjava intro.pptx
java intro.pptx
 
Java introduction
Java introductionJava introduction
Java introduction
 
Javanotes ww8
Javanotes ww8Javanotes ww8
Javanotes ww8
 
Java notes
Java notesJava notes
Java notes
 
intoduction to java
intoduction to javaintoduction to java
intoduction to java
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
 
1 java introduction
1 java introduction1 java introduction
1 java introduction
 
1 java intro
1 java intro1 java intro
1 java intro
 
Jvm
JvmJvm
Jvm
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
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
 

More from 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 database connectivity
Php database connectivityPhp database connectivity
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 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
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Blue brain
Blue brainBlue brain
5g
5g5g
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra

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
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
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 programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
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
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
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
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Java virtual machine

  • 1.
  • 2. Sanooja Jabbar T pinjut@gmail.com 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: info@baabtra.com

Editor's Notes

  1. Before understanding what is JVM let us first know what virtual machine is
  2. 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).
  3. 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