6
Introduction to the Java Virtual Machine 井井井

Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

Embed Size (px)

Citation preview

Page 1: Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

Introduction to the Java Virtual Machine

井民全

Page 2: Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

JVM (Java Virtual Machine) the environment in which the java programs execu

te The specification

define an abstract computer, and the instructions, called bytecode

Bytecode a byte-long instruction that the javac generates Java interpreter executes

Compiler compiles a .java file,it produces a series of bycodes and stores th

em in a .class file.The java interpreter can then execute the by

tecodes stored in the .class file

Page 3: Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

Introduction

Java is more than just a language; it is a computer environment design-time java (the java language) runtime java (the JVM)

This machine can run Java

The machine support the java runtime environment

It implements a JVM

Page 4: Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

Introduction

Java Virtual Specification a document which defines how to implement a

JVM

Implementation of Java Virtual Machine implementation of JVM follows this specification

The JVM Specification is platform independent because, it can be implemented on any platform

Specification: Java.sun.com/docs/books/vmspec/index.html

Page 5: Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

Introduction

The JVM performs following functions Allocating memory for created objects Performing garbage collection Handing register and stack operations Calling on the host system for certain

functions, such as device access Monitoring the security of apps

Page 6: Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an

Reference: “memory management, role of JVM”, JBuilder Help: