当前位置:网站首页>JVM class loading mechanism
JVM class loading mechanism
2022-07-07 20:00:00 【Whiteye too white】
Class loading mechanism
load —> Connect ( verification -> Get ready -> analysis )—> initialization —> Use —> uninstall
1. load
- Get the binary byte stream defining this class through the full class name
- Convert the static storage structure represented by the byte stream to the runtime data structure of the method area
- Generate an in memory... That represents the class Class object , As the access to the data in the method area
2. verification
- class File format validation :class Document specification
- Metadata validation : Semantic analysis , Compliance java language norm
- Bytecode verification : Operation instruction is legal
- Symbol reference validation : Ensure that the parsing action is executed correctly
3. Get ready
Allocate memory for static variables of a class , And initialize it to the default value .
( It's not the initial value ,final Static constants decorated with keywords are directly assigned initial values , Load into the method area runtime constant pool .)
4. analysis
The process of replacing a symbolic reference in a constant pool with a direct reference .
5. initialization
Give the class the correct initial value for its static variables ,JVM Responsible for class initialization , Class variables are mainly initialized .
Initialization class triggers : new Instance object 、 Accessing static variables of a class 、 Calling static methods of a class 、 Reflection calls class 、 When subclasses need to be initialized, initialize the parent class first ( Same interface )、mian Method class .
6. uninstall
- All instance objects of this class have been GC, In other words, there is no instance object of this class in the heap .
- This class is not referenced anywhere .
- An instance of the class loader for this class has been GC.
边栏推荐
- R语言fpc包的dbscan函数对数据进行密度聚类分析、查看所有样本的聚类标签、table函数计算聚类簇标签与实际标签构成的二维列联表
- R语言ggplot2可视化:使用ggpubr包的ggecdf函数可视化分组经验累积密度分布函数曲线、linetype参数指定不同分组曲线的线型
- torch.nn.functional.pad(input, pad, mode=‘constant‘, value=None)记录
- A pot of stew, a collection of common commands of NPM and yarn cnpm
- Nunjuks template engine
- ASP. Net gymnasium integrated member management system source code, free sharing
- Specify the version of OpenCV non-standard installation
- Matplotlib drawing 3D graphics
- Welcome to the markdown editor
- Detailed explanation of Flink parallelism and slot
猜你喜欢

Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
![[RT thread env tool installation]](/img/bc/9b39651d40a240f0893200793f67e9.png)
[RT thread env tool installation]

# 欢迎使用Markdown编辑器

论文解读(ValidUtil)《Rethinking the Setting of Semi-supervised Learning on Graphs》

8 CAS

Empowering smart power construction | Kirin Xin'an high availability cluster management system to ensure the continuity of users' key businesses

2022如何评估与选择低代码开发平台?

Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"

Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决

LeetCode_ 7_ five
随机推荐
R language ggplot2 visualization: use the ggecdf function of ggpubr package to visualize the grouping experience cumulative density distribution function curve, and the linetype parameter to specify t
The research group of the Hunan Organizing Committee of the 24th China Association for science and technology visited Kirin Xin'an
Specify the version of OpenCV non-standard installation
Le PGR est - il utile au travail? Comment choisir une plate - forme fiable pour économiser le cœur et la main - d'œuvre lors de la préparation de l'examen!!!
IP tools
Matplotlib drawing 3D graphics
831. KMP字符串
多个线程之间如何协同
位运算介绍
what‘s the meaning of inference
九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
How to buy bank financial products? Do you need a bank card?
Sword finger offer II 013 Sum of two-dimensional submatrix
“本真”是什么意思
Visual Studio 插件之CodeMaid自动整理代码
Kirin Xin'an won the bid for the new generation dispatching project of State Grid!
ASP.NET幼儿园连锁管理系统源码
how to prove compiler‘s correctness
831. KMP string
R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra