This book is the Chinese translation of Oracle's official The Java Virtual Machine Specification, Java SE 7 Edition, and is part of the Java Core Technology Series. It consolidates the technical changes that have taken place in the Java world since the 1999 publication of The Java Virtual Machine Specification, Second Edition, corrects numerous errors in the second edition as well as content that has become obsolete for mainstream virtual machine implementations, and clarifies some ambiguous concepts concerning the relationship between the Java virtual machine and the Java language. The book comprises 7 chapters: Chapter 1 surveys, from a high-level perspective, the relationship between the Java virtual machine and the Java language and their development; Chapter 2 outlines the overall architecture of the virtual machine, including the class file format, data types, primitive and reference types, run-time data areas (the pc register, Java virtual machine stack, heap, method area, run-time constant pool, and native method stack), frames, object representation, floating-point arithmetic, and exceptions; Chapter 3 explains how Java programs are compiled into the virtual machine instruction set, covering constants, local variables, control structures, arithmetic operations, argument passing, method invocation, arrays, the operand stack, exception handling, synchronization, and annotations; Chapter 4 analyzes the class file format in depth, including the ClassFile structure, descriptors and signatures, the constant pool, fields, methods, attributes, code constraints, and class file verification; Chapter 5 defines virtual machine startup and the loading, linking, and initialization of classes and interfaces; Chapter 6 specifies the instruction set item by item; and Chapter 7 provides a table of opcode mnemonics indexed by opcode value. It should be noted that this book is a contractual specification ensuring that all Java virtual machine implementations share a uniform external interface; it is not an implementation manual for any particular virtual machine. As high-performance virtual machines have evolved, the details of real implementations have gradually diverged from the specification's descriptions.
如果你写过不少 Java 代码,却总在「为什么这里会抛 StackOverflowError」「泛型擦除到底擦掉了什么」「字节码里的 invokespecial 和 invokevirtual 差在哪」这类问题上卡壳,那么这本规范就是最该补齐的那块地基。它不是教程,而是 Oracle 官方发布的技术契约:每一种数据类型、每一个运行时数据区、每一个属性表、每一条指令的语义,都以近乎法律条文的方式被精确定义。 本版的价值在于「承前启后」。它把自 1999 年第 2 版以来的十余年变化一次性收拢,扩充 class 文件格式以支持泛型与变长参数方法等新语言特性,补充了 invokedynamic 等新常量池结构,同时清理了旧版中大量错误与过时描述,并重写了基于类型检查的字节码验证规则——这部分正是理解现代 JVM 类校验机制的关键。 中文版由周志明等四位译者合作完成,译文经过多轮校对,术语体系与国内 JVM 社区通行说法一致;32 开、三百余页的体量,作为案头工具书翻查并不吃力。无论你是想读懂 class 文件反编译结果,还是准备动手写一个玩具虚拟机,它都会是你反复回来查阅的那一本。
In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.