[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Coder994/JavaGuide/patch-1/docs/java/jvm/class-loading-process.md [Back]  [Original]

---
category: Java
tag:
  - JVM
---


# 

## 



![](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-11/-.png)

## 

Class  Class 

 Class **->->****->->**

![](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-6/.png)

[jvm5.4](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-5.html#jvms-5.4) 

![](https://img-blog.csdnimg.cn/20210607102244508.png)

### 

 3 

1. 
2. 
3.  `Class` 

 3 ""  `ZIP`  `JAR``EAR``WAR`  `JSP`

** `loadClass()`  Java **





### 

![](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-6/.png)

### 

****

1.  Class Variables  `static`  Java 
2.  **** JDK 7 HotSpot   JDK 7 HotSpot  Class  Java [Java3#75](https://github.com/fenixsoft/jvm_book/issues/75)
3. "" 00Lnullfalse `public static int value=111`  value  0  111 value  final `public static final int value=111`  value  111

****  ( Java  3   7.33 )


![](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-6/.png)

### 

 7 

****Java 



### 

 ` ()` JVM  Java ()

>  ` ()`

` ()`  ` ()` 

 5 ()

1.  `new`  `getstatic``putstatic`  `invokestatic`  4  `new` ( final )
   -  jvm  `new` 
   -  jvm  `getstatic` ()
   -  jvm  `putstatic` 
   -  jvm  `invokestatic` 
2.  `java.lang.reflect`  `Class.forname("...")`, `newInstance()` 
3. 
4.  ( `main` )
5. `MethodHandle`  `VarHandle`  2 
    `findStaticVarHandle` 
6. **[issue745](https://github.com/Snailclimb/JavaGuide/issues/745)**  JDK8  default 

## 

>  [issue#662](https://github.com/Snailclimb/JavaGuide/issues/662) **[guang19](https://github.com/guang19)** 

 Class  GC

 3 :

1.  GC
2. 
3.  GC

 JVM  jvm 

jdk  `BootstrapClassLoader`, `ExtClassLoader`, `AppClassLoader`  jdk ()

****

-  Java 
-  Java 
- 

Web Proxy Viewer  |  New URL  |  Original Page