JVMclass从加载到执行
2019-03-20 09:09:48 0 举报
JVMclass从加载到执行
作者其他创作
大纲/内容
Initialization
Verification
allocates memory for class variables and initializing the memory to default values
replacing symbolic references from the type with direct references
method data
corresponding binary data
Garbage Collector
look into the method area
解释字节码,然后逐行运行,若同一方法执行多次,则解释多次
Just-In-Time Compiler(JIT)
class loader system
是否和其他类,接口,Enum有关
读入字节码,使用内存中数据,执行指令
Modifier,变量和方法信息
Java Native Interface (JNI)
wrong
destroy un-referenced objects
Preparation
Execution Engine
Interpreter
correctness of .class
creates an object of type java.lang.Class to represent this file in the heap memory
观测到代码的重复调用,就变成native method
.class file
为代码中和static块中定义的静态变量赋值,从父类到子类依次进行
class的全名和父亲名
Resolution
java编译器得到.class文件
Native Method Libraries
Linking
Loading
run-time java.lang.VerifyError
收藏
收藏
0 条评论
回复 删除
下一页