JVM和类的关系 当我们调用JAVA命令运行某个java程序时,该命令将会启动一条java虚拟机进程,不管该java程序有多么复杂,该程序启动了多少个线程,它们都处于该java虚拟机进程里.正如前面介绍的,同一个JVM的所有线程.所有变量都处于同一个进程里,它们都使用该JVM进程的内存区. 当系统出现以下几种情况时,JVM进程将被终止: l 程序运行到最后正常结束. l 程序运行到使用System.exit()或Runtime.getRuntime().exit()代码结束程序 l 程序执
JVM 动态地加载.连接.初始化类或接口(在本文之后的篇幅中,我将使用"类"来表示"类和接口").这里我先贴上 Java 虚拟机规范的原文: Loading is the process of finding the binary representation of a class or interface type with a particular name and creating a class or interface from that binary r