前言
1 Introduction
1.1 A Bit of History
1.2 The Java Virtual Machine
1.3 Organization of the Specification
1.4 Notation
1.5 Feedback
2 The Structure of the Java Virtual Machine
2.1 The class File Format
2.2 Data Types
2.3 Primitive Types and Values
2.3.1 Integral Types and Values
2.3.2 Floating-Point Types, Value Sets, and Values
2.3.3 The returnAddress Type and Values
2.3.4 The boolean Type
2.4 Reference Types and Values
2.5 Run-Time Data Areas
2.5.1 The pc Register
2.5.2 Java Virtual Machine Stacks
2.5.3 Heap
2.5.4 Method Area
2.5.5 Run-Time Constant Pool
2.5.6 Native Method Stacks
2.6 Frames
2.6.1 Local Variables
2.6.2 Operand Stacks
2.6.3 Dynamic Linking
2.6.4 Normal Method Invocation Completion
2.6.5 Abrupt Method Invocation Completion
2.7 Representation of Objects
2.8 Floating-Point Arithmetic
2.8.1 Java Virtual Machine Floating-Point Arithmetic and IEEE 754
2.8.2 Floating-Point Modes
2.8.3 Value Set Conversion
2.9 Special Methods
2.10 Exceptions
2.11 Instruction Set Summary
2.11.1 Types and the Java Virtual Machine
2.11.2 Load and Store Instructions
2.11.3 Arithmetic Instructions
2.11.4 Type Conversion Instructions
2.11.5 Object Creation and Manipulation
2.11.6 Operand Stack Management Instructions
2.11.7 Control Transfer Instructions
2.11.8 Method Invocation and Return Instructions
2.11.9 Throwing Exceptions
2.11.10 Synchronization
2.12 Class Libraries
2.13 Public Design, Private Implementation
3 Compiling for the Java Virtual Machine
3.1 Format of Examples
3.2 Use of Constants, Local Variables, and Control Constructs
3.3 Arithmetic
3.4 Accessing the Run-Time Constant Pool
3.5 More Control Examples
3.6 Receiving Arguments
3.7 Invoking Methods
3.8 Working with Class Instances
3.9 Arrays
3.10 Compiling Switches
3.11 Operations on the Operand Stack
3.12 Throwing and Handling Exceptions
3.13 Compiling finally
3.14 Synchronization
3.15 Annotations
4 The class File Format
4.1 The ClassFile Structure
4.2 The Internal Form of Names
4.2.1 Binary Class and Interface Names
4.2.2 Unqualified Names
4.3 Descriptors
4.3.1 Grammar Notation
4.3.2 Field Descriptors
4.3.3 Method Descriptors
4.4 The Constant Pool
4.4.1 The CONSTANT_Class_info Structure
4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures
4.4.3 The CONSTANT_String_info Structure
4.4.4 The CONSTANT_Integer_info and CONSTANT_Float_info Structures
4.4.5 The CONSTANT_Long_info and CONSTANT_Double_info Structures
4.4.6 The CONSTANT_NameAndType_info Structure
4.4.7 The CONSTANT_Utf8_info Structure
4.4.8 The CONSTANT_MethodHandle_info Structure
4.4.9 The CONSTANT_MethodType_info Structure
4.4.10 The CONSTANT_InvokeDynamic_info Structure
4.5 Fields
4.6 Methods
4.7 Attributes
4.7.1 Defining and Naming New Attributes
4.7.2 The ConstantValue Attribute
4.7.3 The Code Attribute
4.7.4 The StackMapTable Attribute
4.7.5 The Exceptions Attribute
4.7.6 The InnerClasses Attribute
4.7.7 The EnclosingMethod Attribute
4.7.8 The Synthetic Attribute
4.7.9 The Signature Attribute
4.7.9.1 Signatures
4.7.10 The SourceFile Attribute
4.7.11 The SourceDebugExtension Attribute
4.7.12 The LineNumberTable Attribute
4.7.13 The LocalVariableTable Attribute
4.7.14 The LocalVariableTypeTable Attribute
4.7.15 The Deprecated Attribute
4.7.16 The RuntimeVisibleAnnotations Attribute
4.7.16.1 The element_value structure
4.7.17 The RuntimeInvisibleAnnotations Attribute
4.7.18 The RuntimeVisibleParameterAnnotations Attribute
4.7.19 The RuntimeInvisibleParameterAnnotations Attribute
4.7.20 The RuntimeVisibleTypeAnnotations Attribute
4.7.20.1 The target_info union
4.7.20.2 The type_path structure
4.7.21 The RuntimeInvisibleTypeAnnotations Attribute
4.7.22 The AnnotationDefault Attribute
4.7.23 The BootstrapMethods Attribute
4.7.24 The MethodParameters Attribute
4.8 Format Checking
4.9 Constraints on Java Virtual Machine Code
4.9.1 Static Constraints
4.9.2 Structural Constraints
4.10 Verification of class Files
4.10.1 Verification by Type Checking
4.10.1.1 Accessors for Java Virtual Machine Artifacts
4.10.1.2 Verification Type System
4.10.1.3 Instruction Representation
4.10.1.4 Stack Map Frame Representation
4.10.1.5 Type Checking Abstract and Native Methods
4.10.1.6 Type Checking Methods with Code
4.10.1.7 Type Checking Load and Store Instructions
4.10.1.8 Type Checking for protected Members
4.10.1.9 Type Checking Instructions
4.10.2 Verification by Type Inference
4.10.2.1 The Process of Verification by Type Inference
4.10.2.2 The Bytecode Verifier
4.10.2.3 Values of Types long and double
4.10.2.4 Instance Initialization Methods and Newly Created Objects
4.10.2.5 Exceptions and finally
4.11 Limitations of the Java Virtual Machine
5 Loading, Linking, and Initializing
5.1 The Run-Time Constant Pool
5.2 Java Virtual Machine Startup
5.3 Creation and Loading
5.3.1 Loading Using the Bootstrap Class Loader
5.3.2 Loading Using a User-defined Class Loader
5.3.3 Creating Array Classes
5.3.4 Loading Constraints
5.3.5 Deriving a Class from a class File Representation
5.4 Linking
5.4.1 Verification
5.4.2 Preparation
5.4.3 Resolution
5.4.3.1 Class and Interface Resolution
5.4.3.2 Field Resolution
5.4.3.3 Method Resolution
5.4.3.4 Interface Method Resolution
5.4.3.5 Method Type and Method Handle Resolution
5.4.3.6 Call Site Specifier Resolution
5.4.4 Access Control
5.4.5 Overriding
5.5 Initialization
5.6 Binding Native Method Implementations
5.7 Java Virtual Machine Exit
6 The Java Virtual Machine Instruction Set
6.1 Assumptions: The Meaning of "Must"
6.2 Reserved Opcodes
6.3 Virtual Machine Errors
6.4 Format of Instruction Descriptions
mnemonic
6.5 Instructions
aaload
aastore
aconst_null
aload
aload_<n>
anewarray
areturn
arraylength
astore
astore_<n>
athrow
baload
bastore
bipush
caload
castore
checkcast
d2f
d2i
d2l
dadd
daload
dastore
dcmp<op>
dconst_<d>
ddiv
dload
dload_<n>
dmul
dneg
drem
dreturn
dstore
dstore_<n>
dsub
dup
dup_x1
dup_x2
dup2
dup2_x1
dup2_x2
f2d
f2i
f2l
fadd
faload
fastore
fcmp<op>
fconst_<f>
fdiv
fload
fload_<n>
fmul
fneg
frem
freturn
fstore
fstore_<n>
fsub
getfield
getstatic
goto
goto_w
i2b
i2c
i2d
i2f
i2l
i2s
iadd
iaload
iand
iastore
iconst_<i>
idiv
if_acmp<cond>
if_icmp<cond>
if<cond>
ifnonnull
ifnull
iinc
iload
iload_<n>
imul
ineg
instanceof
invokedynamic
invokeinterface
invokespecial
invokestatic
invokevirtual
ior
irem
ireturn
ishl
ishr
istore
istore_<n>
isub
iushr
ixor
jsr
jsr_w
l2d
l2f
l2i
ladd
laload
land
lastore
lcmp
lconst_<l>
ldc
ldc_w
ldc2_w
ldiv
lload
lload_<n>
lmul
lneg
lookupswitch
lor
lrem
lreturn
lshl
lshr
lstore
lstore_<n>
lsub
lushr
lxor
monitorenter
monitorexit
multianewarray
new
newarray
nop
pop
pop2
putfield
putstatic
ret
return
saload
sastore
sipush
swap
tableswitch
wide
7 Opcode Mnemonics by Opcode
Index
A Limited License Grant
這是一本挑戰極限的書。我之前認為自己對Java已經相當熟悉瞭,但《Java虛擬機規範(Java SE 8版 英文版)》像是一盆冷水,讓我意識到還有如此廣闊且未知的領域等著我去探索。我一直對Java的性能調優感到頭疼,尤其是在處理大型、高並發的係統時。這本書中關於性能優化的章節,雖然沒有直接給齣“如何調優”的具體步驟,但它深入剖析瞭JVM的各項性能指標,比如執行引擎的工作方式、即時編譯(JIT)的優化策略、以及各種內存區域的迴收機製。理解這些原理,讓我能夠從根本上理解為什麼某些代碼會慢,為什麼會齣現內存泄漏,以及如何通過調整JVM參數來獲得更好的錶現。書中關於類文件格式的解析也相當細緻,瞭解瞭Class文件的結構,包括魔數、版本信息、常量池、字段、方法等,這對於編寫或者理解一些底層的Java工具,比如字節碼增強工具(ASM, Javassist)非常有幫助。這本書需要很強的英語閱讀能力和對計算機科學的基礎理論有較好的掌握,但一旦剋服瞭這些門檻,你將獲得前所未有的洞察力。它不是那種可以讓你“速成”的書,而是需要你沉下心來,一點點去啃,去理解,去消化。
評分我必須承認,在翻開這本《Java虛擬機規範(Java SE 8版 英文版)》之前,我對JVM的認識還停留在“會用就好”的層麵。然而,這本書徹底改變瞭我的看法。它以一種近乎“黑箱”到“透明”的轉變,讓我看到瞭JVM背後是如何工作的。對我而言,最令我著迷的是其中關於字節碼指令集的詳細描述。理解這些底層的指令,就好像擁有瞭破解Java代碼執行秘密的鑰匙。書中不僅列齣瞭各種指令,還解釋瞭它們的功能、參數以及在虛擬機棧上的操作,這對於我調試一些非常底層的問題,或者嘗試編寫更高效的JVM工具類非常有啓發。同時,我對並發模型部分的講解也深有體會。Java內存模型(JMM)的各種規則,happens-before關係,以及volatile、synchronized關鍵字的真正含義,都在書中得到瞭嚴謹的定義。這讓我明白瞭為什麼在多綫程環境下會齣現各種看似不可思議的現象,以及如何通過遵循規範來編寫健壯的並發程序。這本書的語言雖然專業,但邏輯清晰,結構完整,每當我遇到某個不解的Java行為時,都能在這本書中找到答案的綫索。它不僅僅是一本技術手冊,更是一種對Java語言底層設計哲學和工程智慧的深刻解讀。
評分這本《Java虛擬機規範(Java SE 8版 英文版)》絕對是我近幾年來最令人振奮的閱讀體驗之一。作為一個長期在Java生態中摸爬滾打的開發者,我一直渴望能深入理解Java虛擬機(JVM)的底層運作機製,而這本書無疑是金字塔尖的寶藏。它以一種極其嚴謹且係統的方式,為我描繪瞭JVM的藍圖。我尤其喜歡它對內存模型的詳細闡述,從堆、棧到方法區,每一個區域的職責、生命周期以及它們之間的交互都解釋得淋灕盡緻。書中對垃圾迴收算法的剖析更是讓我茅塞頓開,我終於能理解不同迴收器(如Serial, Parallel, CMS, G1)的原理、適用場景以及它們的權衡之處。過去,我常常因為一些難以捉摸的性能問題而頭疼,但現在,通過這本書的指導,我能夠更有針對性地去分析和優化,這對於提升應用程序的穩定性和效率至關重要。而且,它對類加載機製的深入講解,從加載、驗證、準備、解析到初始化的每一個階段都做瞭清晰的界定,這對於理解Java的動態性、多態性以及避免一些常見的類加載問題非常有幫助。這本書並非易讀之物,需要相當的耐心和基礎知識,但一旦你投入進去,所收獲的洞察力是無價的。它就像是一張詳盡的地圖,指引著我們穿越Java語言的錶象,直達其核心的運行機製。
評分作為一名資深的Java開發者,我一直在尋找一本能夠真正解答我關於JVM“為什麼”的書,而《Java虛擬機規範(Java SE 8版 英文版)》恰好滿足瞭我的需求。我尤其對其中關於執行引擎(Execution Engine)部分的描述印象深刻,它詳細闡述瞭Java虛擬機如何解釋執行字節碼,以及即時編譯(JIT)技術如何通過將熱點代碼編譯成本地機器碼來提升性能。理解JIT的原理,讓我對Java的“一次編寫,到處運行”的跨平颱特性有瞭更深刻的認識,也明白瞭為什麼Java在啓動時可能相對較慢,但一旦“預熱”完成,性能就能大幅提升。書中對類加載過程的詳盡描述,包括雙親委派模型(Parent Delegation Model),對於理解Java的類加載機製、避免類加載衝突、以及實現自定義類加載器都有著重要的指導意義。這本書的語言雖然精煉,但內容極其豐富,它以一種非常嚴謹和規範的方式,為讀者展現瞭JVM的內在世界。它不是一本可以輕鬆翻閱的書籍,需要投入大量的時間和精力去理解其中的概念和原理,但其帶來的迴報是巨大的,能夠極大地提升開發者對Java語言的掌控力,並幫助他們在實際開發中做齣更明智的決策。
評分對於任何一個想要深入理解Java的人來說,《Java虛擬機規範(Java SE 8版 英文版)》都是一本不可或缺的參考書。我特彆欣賞它對Java語言的抽象模型和JVM實現的精確描述。這本書不是教你如何寫Java代碼,而是教你Java代碼是如何被運行的。我喜歡它對異常處理機製的細緻說明,以及Java棧幀(Stack Frame)的組成和生命周期。理解棧幀,對於理解方法調用、局部變量錶、操作數棧以及動態鏈接等概念至關重要。而且,書中關於綫程模型和同步機製的闡述,為我解答瞭許多在並發編程中遇到的睏惑。它清晰地定義瞭Java內存模型(JMM)中各個內存操作的語義,以及happens-before關係的規則,這對於避免數據競爭和綫程安全問題提供瞭堅實的基礎。雖然這本書的語言相對嚴謹和技術化,但其邏輯非常嚴密,層層遞進,能夠幫助讀者建立起一個完整的JVM知識體係。我常常在遇到一些Java行為的“怪癖”時,會迴到這本書中查找相關的解釋,並且每次都能獲得新的啓發。它就像是一本底層的“操作手冊”,讓Java在你眼中不再是神秘的黑盒。
評分很不錯的書籍,Java經典之作,希望能有收貨
評分活動時買的,很劃算,英文原版,慢慢啃
評分寫更高效的代碼必備
評分京東商城,品質保證,物流高效,服務到傢,十分給力,超贊一哈!
評分提升自己技能中,希望能堅持下去
評分質量不錯 看著比較舒服 內容不錯實用 看得挺快的
評分書中沒有什麼非常艱深的語法,英語水平6級左右閱讀這本書不會有太大壓力。此書不適閤java初學者閱讀。
評分書直接是裸著裝在袋子裏的 連封紙都沒有 感覺不是正版
評分很經典的書,對於Objective-c的提升有很大的幫助
本站所有內容均為互聯網搜尋引擎提供的公開搜索信息,本站不存儲任何數據與內容,任何內容與數據均與本站無關,如有需要請聯繫相關搜索引擎包括但不限於百度,google,bing,sogou 等
© 2025 book.coffeedeals.club All Rights Reserved. 靜流書站 版權所有