天天看點

JVMS Specification(4)-Loading, Linking,and Initializing

THE Java virtual machine dynamically loads, links and initializes classes and interfaces.

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

representation. Linking is the process of taking a class or interface and combining it

into the runtime state of the Java virtual machine so that it can be executed. Initialization

of a class or interface consists of executing the class or interface initialization

method <clinit> (§2.9).

In this chapter, Section 4.1 describes how the Java virtual machine derives symbolic

references from the binary representation of a class or interface. Section 4.2

explains how the processes of loading, linking, and initialization are first initiated by

the Java virtual machine. Section 4.3 specifies how binary representations of

classes and interfaces are loaded by class loaders and how classes and interfaces

are created. Linking is described in Section 4.4. Section 4.5 details how classes

and interfaces are initialized. Section 4.6 introduces the notion of binding native

methods. Finally, Section 4.7 describes when a Java virtual machine exits.

jvm動态加載,連接配接和初始化類或者接口,加載過程是找到類或者接口的二進制表現形式,

連接配接的過程是把接口或者類和jvm運作狀态綁定在一起,是以才能被執行。初始化是類或者接口執行類或者接口的初始化<clinit>方法。

4.1節,讨論JVM如何符号引用了一個類或者接口的二進制表現形式。

4.2節,解釋了加載,連接配接,初始化過程是如何首先被jvm初始化的。

4.3節,類或者接口的二進制表現試試如何被類加載器加載和對象如何被建立。

4.4節,連接配接過程。

4.5節,接口或者類的初始化。