
JVM
森林森
java学习
展开
-
java class局部变量表
每个栈帧内部都包含一组称为局部变量表的变量列表,局部变量表的大小在编译期音就已经确定了,对应class文件中方法Code属性的max_locals字段,Java虚拟机会根据max_locals字段来分配方法执行过程中需要分配的最大局部变量表的容量 例一 public class MyJvmTest { public void foo(int d ,String name){ String tmp ="A"; } } class文件 javap -c -v -l MyJv原创 2020-06-03 20:40:54 · 492 阅读 · 0 评论 -
javap查看类文件
public class Hello { public static void main(String[] args) { System.out.println("Hello, World"); } } 不加任何参数 javap Hello.class Compiled from "Hello.java" public class com.ghgcn.jvm.chapter01.Hello { public com.ghgcn.jvm.chapter01.Hel..原创 2020-06-02 20:09:23 · 309 阅读 · 0 评论 -
Java Class类文件结构
class 文件结构 https://www.viralpatel.net/tutorial-java-class-file-format-revealed/ A Java class file is consist of 10 basic sections: Magic Number: 0xCAFEBABE Version of Class File Format: the minor and major versions of the class file Constant Pool: Pool of原创 2020-06-02 19:59:42 · 459 阅读 · 0 评论