JVM Structure






JVM Architecture

Life of JVM

Loading





ClassLoader


public class ClassLoaderTest{
public static void main(String[] args){
// 系统类加载器
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
System.out.println(systemClassLoader); //
//获取系统类加载器的上级:扩展类加载器
ClassLoader extClassLoader = systemClassLoader.getParent();
System.out.println(extClassLoader); //
// 获取本类的加载器
ClassLoader selfClassLoader = ClassLoaderTest.class.getClassLoader();
System.out.println(selfClassLoader); //
}
}






双亲委派机制



What makes it all the same:


PC register


VM Stack




操作数栈(表达式栈)

动态链接





Native Method Interface

Native Method Stack

Default Garbage Collector : G1