CART

(0) items

The Java™ Virtual Machine Specification,9780201432947

The Java™ Virtual Machine Specification

by ;
Edition:
2nd
ISBN13:

9780201432947

ISBN10:
0201432943
Format:
Paperback
Pub. Date:
4/14/1999
Publisher(s):
Addison-Wesley Professional
List Price: $49.99

Buy New Book

Currently Available, Usually Ships in 24-48 Hours
$35.30

Rent Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

More New and Used
from Private Sellers
Starting at $0.01

Questions About This Book?

What version or edition is this?
This is the 2nd edition with a publication date of 4/14/1999.
What is included with this book?
  • The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any CDs, lab manuals, study guides, etc.

Related Products


  • The Java Virtual Machine Specification, Java SE 7 Edition
    The Java Virtual Machine Specification, Java SE 7 Edition
  • The Java Virtual Machine Specification, Java SE 8 Edition
    The Java Virtual Machine Specification, Java SE 8 Edition




Summary

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.



0201432943B04062001

Author Biography

Tim Lindholm, Distinguished Engineer in Java Software at Sun Microsystems, Inc., was an original member of the Java project at Sun. He was a key contributor to the Java programming language and remains the senior architect of the Java virtual machine and the Java 2 runtime environment. He is also the Technical Editor of The Java(TM) Series.

Frank Yellin, Staff Engineer in Embedded and Consumer at Sun Microsystems, Inc., was an original member of the Java project at Sun. He has spent a decade working on the runtime systems for interpreted and compiled languages. Previously he worked at Lucid, where he focused on multitasking, garbage collection, interrupts, and the compilation of Common Lisp.



0201432943AB04062001

Table of Contents

Preface xiii
Introduction
1(4)
A Bit of History
1(1)
The Java Virtual Machine
2(1)
Summary of Chapters
3(1)
Notation
3(2)
Java Programming Language Concepts
5(56)
Unicode
5(1)
Identifiers
6(1)
Literals
6(1)
Types and Values
7(6)
Primitive Types and Values
7(1)
Operators on Integral Values
8(1)
Floating-Point Types, Value Sets, and Values
8(2)
Operators on Floating-Point Values
10(1)
Operators on boolean Values
11(1)
Reference Types, Objects, and Reference Values
11(1)
The Class Object
12(1)
The Class String
12(1)
Operators on Objects
12(1)
Variables
13(3)
Initial Values of Variables
14(1)
Variables Have Types, Objects Have Classes
15(1)
Conversions and Promotions
16(8)
Identity Conversions
17(1)
Widening Primitive Conversions
17(1)
Narrowing Primitive Conversions
18(1)
Widening Reference Conversions
19(1)
Narrowing Reference Conversions
19(1)
Value Set Conversion
20(1)
Assignment Conversion
21(1)
Method Invocation Conversion
22(1)
Casting Conversion
23(1)
Numeric Promotion
23(1)
Names and Packages
24(4)
Simple Names and Qualified Names
24(1)
Packages
24(1)
Members
25(1)
Qualified Names and Access Control
26(1)
Fully Qualified Names
27(1)
Classes
28(1)
Class Names
28(1)
Class Modifiers
28(1)
Superclasses and Subclasses
29(1)
The Class Members
29(1)
Fields
29(2)
Field Modifiers
30(1)
Initialization of Fields
31(1)
Methods
31(2)
Formal Parameters
32(1)
Method Signature
32(1)
Method Modifiers
32(1)
Static Initializers
33(1)
Constructors
34(1)
Constructor Modifiers
34(1)
Interfaces
35(2)
Interface Modifiers
35(1)
Superinterfaces
36(1)
Interfaces Members
36(1)
Overriding, Inheritance, and Overloading in Interfaces
37(1)
Nested Classes and Interfaces
37(1)
Arrays
38(1)
Array Types
38(1)
Array Variables
39(1)
Array Creation
39(1)
Array Access
39(1)
Exceptions
39(7)
The Causes of Exceptions
40(1)
Handling an Exception
41(2)
The Exception Hierarchy
43(1)
The Classes Exception and RuntimeException
43(3)
Execution
46(11)
Virtual Machine Start-up
46(2)
Loading
48(1)
Linking: Verification, Preparation, and Resolution
49(2)
Initialization
51(1)
Detailed Initialization Procedure
52(2)
Creation of New Class Instances
54(2)
Finalization of Class Instances
56(1)
Unloading of Classes and Interfaces
57(1)
Virtual Machine Exit
57(1)
FP-strict Expressions
57(1)
Threads
58(3)
The Structure of the Java Virtual Machine
61(32)
The Class File Format
61(1)
Data Types
61(1)
Primitive Types and Values
62(4)
Integral Types and Values
63(1)
Floating-Point Types, Value Sets, and Values
63(3)
The returnAddress Types and Values
66(1)
The boolean Type
66(1)
Reference Types and Values
66(1)
Runtime Data Areas
67(4)
The pc Register
67(1)
Java Virtual Machine Stacks
67(1)
Heap
68(1)
Method Area
69(1)
Runtime Constant Pool
70(1)
Native Method Stacks
70(1)
Frames
71(4)
Local Variables
72(1)
Operand Stacks
73(1)
Dynamic Linking
74(1)
Normal Method Invocation Completion
74(1)
Abrupt Method Invocation Completion
74(1)
Additional Information
75(1)
Representation of Objects
75(1)
Floating-Point Arithmetic
75(3)
Java Virtual Machine Floating-Point Arithmetic and IEEE 754
75(1)
Floating-Point Modes
76(1)
Value Set Conversion
77(1)
Specially Named Initialization Methods
78(1)
Exceptions
78(2)
Instruction Set Summary
80(11)
Types and the Java Virtual Machine
80(3)
Load and Store Instructions
83(1)
Arthmetic Instructions
84(2)
Type Conversion Instructions
86(2)
Object Creation and Manipulation
88(1)
Operand Stack Management Instructions
88(1)
Control Transfer Instructions
88(1)
Method Invocation and Return Instructions
89(1)
Throwing Exceptions
90(1)
Implementing finally
90(1)
Synchronization
90(1)
Class Libraries
91(1)
Public Design, Private Implementation
91(2)
The Class File Format
93(62)
The ClassFile Structure
94(5)
The Internal Form of Fully Qualified Class and Interface Names
99(1)
Descriptors
99(4)
Grammar Notation
99(1)
Field Descriptors
100(2)
Method Descriptors
102(1)
The Constant Pool
103(9)
The CONSTANT_Class_info Structure
104(1)
The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures
105(1)
The CONSTANT_String_info Structure
106(1)
The CONSTANT_Integer_info and CONSTANT_Float_info Structures
107(1)
The CONSTANT_Long_info and CONSTANT_Double_info Structures
108(2)
The CONSTANT_NameAndType_info Structure
110(1)
The CONSTANT_Utf8_info Structure
110(2)
Fields
112(2)
Methods
114(3)
Attributes
117(16)
Defining and Naming New Attributes
118(1)
The ConstantValue Attribute
119(1)
The Code Attribute
120(3)
The Exceptions Attribute
123(2)
The InnerClasses Attribute
125(2)
The Synthetic Attribute
127(1)
The SourceFile Attribute
128(1)
The LineNumberTable Attribute
129(1)
The LocalVariableTable Attribute
130(2)
The Deprecated Attribute
132(1)
Constraints on Java Virtual Machine Code
133(7)
Static Constraints
133(4)
Structural Constraints
137(3)
Verification of class Files
140(12)
The Verification Process
141(2)
The Bytecode Verifier
143(3)
Values of Types long and double
146(1)
Instance Initialization Methods and Newly Created Objects
147(1)
Exception Handlers
148(1)
Exceptions and finally
149(3)
Limitations of the Java Virtual Machine
152(3)
Loading, Linking, and Initializing
155(16)
The Runtime Constant Pool
155(3)
Virtual Machine Start-up
158(1)
Creation and Loading
158(6)
Loading Using the Bootstrap Class Loader
160(1)
Loading Using a User-defined Class Loader
160(1)
Creating Array Classes
161(1)
Loading Constraints
162(1)
Deriving a Class from a class File Representation
163(1)
Linking
164(6)
Verification
164(1)
Preparation
165(1)
Resolution
165(4)
Access Control
169(1)
Initialization
170(1)
Binding Native Method Implementations
170(1)
The Java Virtual Machine Instruction Set
171(192)
Assumptions: The Meaning of ``Most''
171(1)
Reserved Opcodes
172(1)
Virtual Machine Errors
172(1)
Format of Instruction Descriptions
172(191)
Compiling for the Java Virtual Machine
363(34)
Format of Examples
364(1)
Use of Constants, Local Variables, and Control Constructs
365(4)
Arithmetic
369(1)
Accessing the Runtime Constant Pool
370(2)
More Control Examples
372(3)
Receiving Arguments
375(1)
Invoking Methods
376(3)
Working with Class Instances
379(2)
Arrays
381(3)
Compiling Switches
384(2)
Operations on the Operand Stack
386(1)
Throwing and Handling Exceptions
387(4)
Compiling finally
391(3)
Synchronization
394(2)
Compiling Nested Classes and Interfaces
396(1)
Threads and Locks
397(18)
Terminology and Framework
397(2)
Execution Order and Consistency
399(1)
Rules About Variables
400(2)
Nonatomic Treatment of double and long Variables
402(1)
Rules About Locks
402(1)
Rules About the Interaction of Locks and Variables
403(1)
Rules for volatile Variables
404(1)
Prescient Store Operations
404(1)
Discussion
405(1)
Example: Possible Swap
406(4)
Example: Out-of-Order Writes
410(2)
Threads
412(1)
Locks and Synchronization
412(1)
Wait Sets and Notification
413(2)
Opcode Mnemonics by Opcode
415(4)
Appendix: Summary of Clarifications and Amendments
419(12)
Index 431

Excerpts

The Java(TM) virtual machine specification has been written to fully document the design of the Java virtual machine. It is essential for compiler writers who wish to target the Java virtual machine and for programmers who want to implement a compatible Java virtual machine. It is also a definitive source for anyone who wants to know exactly how the Java programming language is implemented. The Java virtual machine is an abstract machine. References to the Java virtual machinethroughout this specification refer to this abstract machine rather than to Sun''s or any other specific implementation. This book serves as documentation for a concrete implementation of the Java virtual machine only as a blueprint documents a house. An implementation of the Java virtual machine (known as a runtime interpreter) must embody this specification, but is constrained by it only where absolutely necessary. The Java virtual machine specified here will support the Java programming language specified in The Java(TM) Language Specification(Addison-Wesley, 1996). It is compatible with the Java platform implemented by Sun''s JDK(TM) releases 1.0.2 and 1.1 and the Java(R) 2 platform implemented by Sun''s Java(R) 2 SDK, Standard Edition, v1.2 (formerly known as JDK release 1.2). We intend that this specification should sufficiently document the Java virtual machine to make possible compatible clean-room implementations. If you are considering constructing your own Java virtual machine implementation, feel free to contact us to obtain assistance to ensure the 100% compatibility of your implementation. Send comments on this specification or questions about implementing the Java virtual machine to our electronic mail address:jvm@java.sun.com. To learn the latest about the Java 2 platform, or to download the latest Java 2 SDK release, visit our World Wide Web site athttp://java.sun.com. For updated information about the Java Series, including errata for The Java(TM) Virtual Machine Specification, and previews of forthcoming books, visithttp://java.sun.com/Series The virtual machine that evolved into the Java virtual machine was originally designed by James Gosling in 1992 to support the Oak programming language. The evolution into its present form occurred through the direct and indirect efforts of many people and spanned Sun''s Green project, FirstPerson, Inc., the LiveOak project, the Java Products Group, JavaSoft, and today, Sun''s Java Software. The authors are grateful to the many contributors and supporters. This book began as internal project documentation. Kathy Walrath edited that early draft, helping to give the world its first look at the internals of the Java programming language. It was then converted to HTML by Mary Campione and was made available on our Web site before being expanded into book form. The creation of The Java(TM) Virtual Machine Specificationowes much to the support of the Java Products Group led by General Manager Ruth Hennigar, to the efforts of series editor Lisa Friendly, and to editor Mike Hendrickson and his group at Addison-Wesley. The many criticisms and suggestions received from reviewers of early online drafts, as well as drafts of the printed book, improved its quality immensely. We owe special thanks to Richard Tuck for his careful review of the manuscript and to the authors of The Java(TM) Language Specification,Addison-Wesley, 1996, for allowing us to quote extensively from that book. Particular thanks to Bill Joy whose comments, reviews, and guidance have contributed greatly to the completeness and accuracy of this book. Notes on the Second Edition The second edition of The Java(TM) Virtual Machine Specificationbrings the specification of the Java virtual machine up to date with the Java(R) 2 platform, v1.2. It also includes many corrections and clarifications that update the presentation of the specification without changing the logical specification itself. We have attempted to correct typos and errata (hopefully without introducing new ones) and to add more detail to the specification where it was vague or ambiguous. In particular, we corrected a number of inconsistencies between the first edition of The Java(TM) Virtual Machine Specificationand The Java(TM) Language Specification. We thank the many readers who combed through the first edition of this book and brought problems to our attention. Several individuals and groups deserve special thanks for pointing out problems or contributing directly to the new material: Carla Schroer and her teams of compatibility testers in Cupertino, California, and Novosibirsk, Russia (with special thanks to Leonid Arbouzov and Alexei Kaigorodov), painstakingly wrote compatibility tests for each testable assertion in the first edition. In the process they uncovered many places where the original specification was unclear or incomplete. Jeroen Vermeulen, Janice Shepherd, Peter Bertelsen, Roly Perera, Joe Darcy, and Sandra Loosemore have all contributed comments and feedback that have improved this edition. Marilyn Rash and Hilary Selby Polk of Addison Wesley Longman helped us to improve the readability and layout of this edition at the same time as we were incorporating all the technical changes. Special thanks go to Gilad Bracha, who has brought a new level of rigor to the presentation and has been a major contributor to much of the new material, especially chapters 4 and 5 and the new "Appendix: Summary of Clarifications and Amendments." His dedication to "computational theology" and his commitment to resolving inconsistencies between The Java(TM) Virtual Machine Specificationand The Java(TM) Language Specificationhave benefited this book tremendously. Tim Lindholm Frank Yellin Java Software, Sun Microsystems, Inc. References --IEEE Standard for Binary Floating-Point Arithmetic,ANSI/IEEE Std. 754-1985. Available from Global Engineering Documents, 15 Inverness Way East, Englewood, Colorado 80112-5704 USA, +1 800 854 7179. --Hoare, C.A.R. Hints on Programming Language Design.Stanford University Computer Science Department Technical Report No CS-73-403, December 1973. Reprinted in Sigact/Sigplan Symposium on Principles of Programming Languages. Association for Computing Machinery, New York, October 1973. --Unicode Consortium, The. The Unicode Standard: Worldwide Character Encoding, Version 1.0, Volume 1,ISBN 0-201-56788-1, and Volume 2,ISBN 0-201-60845-6. Updates and additions necessary to bring the Unicode Standard up to version 1.1 may be found athttp://www.unicode.org--Unicode Consortium, The. The Unicode Standard, Version 2.0,ISBN 0-201-48345-9. Updates and additions necessary to bring the Unicode Standard up to version 2.1 may be found athttp://www.unicode.org 0201432943P04062001


Please wait while the item is added to your cart...