Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

The Java Virtual Machine Specification / Edition 2
  • Alternative view 1 of The Java Virtual Machine Specification / Edition 2
  • Alternative view 2 of The Java Virtual Machine Specification / Edition 2

The Java Virtual Machine Specification / Edition 2

by Tim Lindholm, Frank Yellin

ISBN-10: 0201432943

ISBN-13: 9780201432947

Pub. Date: 04/08/1999

Publisher: Addison-Wesley

The nucleus of the Java(TM) 2 platform, the Java(TM) virtual machine is the technology that enables the Java 2 platform to host applications on any computer or operating system without rewriting or recompiling. The Java virtual machine is also responsible for the compactness of applications targeting the Java 2 platform, and is the basis for its security


The nucleus of the Java(TM) 2 platform, the Java(TM) virtual machine is the technology that enables the Java 2 platform to host applications on any computer or operating system without rewriting or recompiling. The Java virtual machine is also responsible for the compactness of applications targeting the Java 2 platform, and is the basis for its security capabilities.

This book was written by those directly responsible for the design and implementation of the Java virtual machine, and is the complete and definitive specification for the technology. It is an essential reference for writers of compilers for the Java programming language and implementors of the Java virtual machine. This second edition specifies the newest version of the Java virtual machine and provides a fascinating view into the inner workings of the Java 2 platform.

In this book you will find comprehensive coverage of the class file format, the hardware, operating system, and implementation-independent binary format for compiled code. The authors fully describe the instruction set of the Java virtual machine. You will find an entire chapter of examples that demonstrate how to compile code written in the Java programming language into the instruction set of the Java virtual machine. In addition, the book presents a discussion on the vital topic of Java virtual machine threads and their interaction with memory.

All in all, this comprehensive, detailed, and methodical presentation provides the information necessary to implement your own fully compatible Java virtual machine.


Product Details

Publication date:
Java Series
Edition description:
Second Edition
Product dimensions:
7.40(w) x 9.10(h) x 1.00(d)

Table of Contents


1. Introduction.

A Bit of History.

The Java Virtual Machine.

Summary of Chapters.


2. Java Programming Language Concepts.




Types and Values.

Primitive Types and Values.

Operators on Integral Values.

Floating-Point Types, Value Sets, and Values.

Operators on Floating-Point Values.

Operators on boolean Values.

Reference Types, Objects, and Reference Values.

The Class Object.

The Class String.

Operators on Objects.


Initial Values of Variables.

Variables Have Types, Objects Have Classes.

Conversions and Promotions.

Identity Conversions.

Widening Primitive Conversions.

Narrowing Primitive Conversions.

Widening Reference Conversions.

Narrowing Reference Conversions.

Value Set Conversion.

Assignment Conversion.

Method Invocation Conversion.

Casting Conversion.

Numeric Promotion.

Names and Packages.




Package Members.

The Members of a Class Type.

The Members of an Interface Type.

The Members of an Array Type.

Qualified Names and Access Control.

Fully Qualified Names.


Class Names.

Class Modifiers.

Superclasses and Subclasses.

The Class Members.


Field Modifiers.

Initialization of Fields.


Formal Parameters.

Method Signature.

Method Modifiers.

Static Initializers.


Constructor Modifiers.


Interface Modifiers.


Interface Members.

Interface (Constant) Fields.

Interface (Abstract) Methods.

Overriding, Inheritance, and Overloading in Interfaces.

Nested Classes and Interfaces.


Array Types.

Array Variables.

Array Creation.

Array Access.


The Causes of Exceptions.

Handling an Exception.

The Exception Hierarchy.

The Classes Exception and RuntimeException.


Virtual Machine Start-up.


Linking: Verification, Preparation, and Resolution.


Detailed Initialization Procedure.

Creation of New Class Instances.

Finalization of Class Instances.

Unloading of Classes and Interfaces.

Virtual Machine Exit.

FP-strict Expressions.


3. The Structure of the Java Virtual Machine.

The class File Format.

Data Types.

Primitive Types and Values.

Integral Types and Values.

Floating-Point Types, Value Sets, and Values.

The returnAddress Type and Values.

The boolean Type.

Reference Types and Values.

Runtime Data Areas.

The pc Register.

Java Virtual Machine Stacks.


Method Area.

Runtime Constant Pool.

Native Method Stacks.


Local Variables.

Operand Stacks.

Dynamic Linking.

Normal Method Invocation Completion.

Abrupt Method Invocation Completion.

Additional Information.

Representation of Objects.

Floating-Point Arithmetic.

Java Virtual Machine Floating-Point Arithmetic and IEEE 754.

Floating-Point Modes.

Value Set Conversion.

Specially Named Initialization Methods.


Instruction Set Summary.

Types and the Java Virtual Machine.

Load and Store Instructions.

Arithmetic Instructions.

Type Conversion Instructions.

Object Creation and Manipulation.

Operand Stack Management Instructions.

Control Transfer Instructions.

Method Invocation and Return Instructions.

Throwing Exceptions.

Implementing finally.


Class Libraries.

Public Design, Private Implementation.

4. The class File Format.

The ClassFile Structure.

The Internal Form of Fully Qualified Class and Interface Names.


Grammar Notation.

Field Descriptors.

Method Descriptors.

The Constant Pool.

The CONSTANT_Class_info Structure.

The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures.

The CONSTANT_String_info Structure.

The CONSTANT_Integer_info and CONSTANT_Float_info Structures.

The CONSTANT_Long_info and CONSTANT_Double_info Structures.

The CONSTANT_NameAndType_info Structure.

The CONSTANT_Utf8_info Structure.




Defining and Naming New Attributes.

The ConstantValue Attribute.

The Code Attribute.

The Exceptions Attribute.

The InnerClasses Attribute.

The Synthetic Attribute.

The SourceFile Attribute.

The LineNumberTable Attribute.

The LocalVariableTable Attribute.

The Deprecated Attribute.

Constraints on Java Virtual Machine Code.

Static Constraints.

Structural Constraints.

Verification of class Files.

The Verification Process.

The Bytecode Verifier.

Values of Types long and double.

Instance Initialization Methods and Newly Created Objects.

Exception Handlers.

Exceptions and finally.

Limitations of the Java Virtual Machine.

5. Loading, Linking, and Initializing.

The Runtime Constant Pool.

Virtual Machine Start-up.

Creation and Loading.

Loading Using the Bootstrap Class Loader.

Loading Using a User-defined Class Loader.

Creating Array Classes.

Loading Constraints.

Deriving a Class from a class File Representation.





Access Control.


Binding Native Method Implementations.

6. The Java Virtual Machine Instruction Set.

Assumptions: The Meaning of “Must.”

Reserved Opcodes.

Virtual Machine Errors.

Format of Instruction Descriptions.

7. Compiling for the Java Virtual Machine.

Format of Examples.

Use of Constants, Local Variables, and Control Constructs.


Accessing the Runtime Constant Pool.

More Control Examples.

Receiving Arguments.

Invoking Methods.

Working with Class Instances.


Compiling Switches.

Operations on the Operand Stack.

Throwing and Handling Exceptions.

Compiling finally.


Compiling Nested Classes and Interfaces.

8. Threads and Locks.

Terminology and Framework.

Execution Order and Consistency.

Rules About Variables.

Nonatomic Treatment of double and long Variables.

Rules About Locks.

Rules About the Interaction of Locks and Variables.

Rules for volatile Variables.

Prescient Store Operations.


Example: Possible Swap.

Example: Out-of-Order Writes.


Locks and Synchronization.

Wait Sets and Notification.

9. Opcode Mnemonics by Opcode.

Appendix: Summary of Clarifications and Amendments.

Index. 0201432943T04062001

Customer Reviews

Average Review:

Post to your social network


Most Helpful Customer Reviews

See all customer reviews