1 .class 文件 jvm整体示意
2 .class -->到内存
3 加载class过程
link---prepare:静态域默认值设置,继承约束检查,接口实现约束检查
Preparation involves creating the static fields for a class or interface and initializing such fields to their default values.
This does not require the execution of any Java Virtual Machine code; explicit initializers for static fields are executed as part of initialization , not
preparation.
link---resolve: 主要动态引用的确定
The Java Virtual Machine instructions anewarray, checkcast, getfield, getstatic, instanceof, invokedynamic, invokeinterface, invokespecial, invokestatic, invokevirtual, ldc, ldc_w,multianewarray, new, putfield,
and putstatic make symbolic references to the run-time constant pool. Execution of any of these instructions requires resolution of its symbolic reference.
Resolution is the process of dynamically determining concrete values from symbolic references in the run-time constant pool.
a specific invokedynamic instruction is a call site object bound to that specific invokedynamic instruction
4 内存模型-方法区和堆
5 内存模型--pc计数器 栈 本地方法区
6 执行器--解释器 ,Just IN Time 编译器 ,hotspot profiler ,GC

本文详细介绍了Java虚拟机(JVM)加载Class文件的过程,包括从Class文件加载到内存的具体步骤,链接阶段中准备阶段的工作原理,以及解决符号引用的具体机制。此外,还概述了JVM的内存模型及执行器组件。
5097

被折叠的 条评论
为什么被折叠?



