当前位置:网站首页>What class loading mechanisms does the JVM have?
What class loading mechanisms does the JVM have?
2022-07-01 22:50:00 【Zhan sir (open source byte)】
JVM What are the class loading mechanisms ?
1、 Overall responsible for , When a classloader is responsible for loading a certain Class when , The Class Other things that are relied on and quoted Class This kind of loader will also be responsible for loading , Unless it is shown that another classloader is used to load
2、 Parent delegation , First let the parent loader try to load the class , Try to load the class from your own classpath only if the parent loader cannot load the class
3、 Caching mechanisms , The caching mechanism will ensure that all loaded Class Will be cached , When you need to use a Class when , The classloader first looks for this... From the cache Class, Only the cache does not exist , The system will read the binary data corresponding to this class , And turn it into Class object , Store in cache . That's why it's modified Class after , Must restart JVM, Changes to the program will take effect
4、 Parent delegate mechanism , If a class loader receives a class load request , It doesn't try to load the class itself first , Instead, the request is delegated to the parent loader to complete , One by one , therefore , All class loading requests should eventually be passed to the top-level boot class loader , Only if the parent loader does not find the required class in its search scope , That is, the load cannot be completed , The child loader will try to load the class by itself .
Parental delegation mechanism process ?
1、 When AppClassLoader Load one class when , It doesn't try to load the class itself first , Instead, delegate the class load request to the parent loader ExtClassLoader To complete .
2、 When ExtClassLoader Load one class when , It doesn't try to load the class itself first , Instead, delegate the class load request to BootStrapClassLoader To complete .
3、 If BootStrapClassLoader Loading failed ( For example, in $JAVA_HOME/jre/lib We didn't find the class), Will use ExtClassLoader To try to load ;
4、 if ExtClassLoader Also failed to load , Will use AppClassLoader To load the , If AppClassLoader Also failed to load , Then an exception will be reported ClassNotFoundException.
If you reprint , Please indicate the source : Open source byte https://sourcebyte.cn/article/174.html
边栏推荐
- Detailed explanation of common configurations in redis configuration file [easy to understand]
- MySQL的存储过程
- General use of qstringlist
- MySQL view exercise
- Understanding of indexes in MySQL
- Pytorch nn.functional.unfold()的简单理解与用法
- MySQL中对于索引的理解
- MySQL的视图练习题
- 104. SAP ui5 table control supports multi select and how to select multiple table row items at a time with code
- 【扫盲】机器学习图像处理中的深层/浅层、局部/全局特征
猜你喜欢

MySQL中对于索引的理解

SAP 智能机器人流程自动化(iRPA)解决方案分享

Appium automated testing foundation - Supplement: introduction to desired capabilities parameters

删除AWS绑定的信用卡账户

【无标题】

Share some feelings of a programmer who has experienced layoffs twice a year

447 Bili Bili noodles warp 1

104. SAP ui5 table control supports multi select and how to select multiple table row items at a time with code

陈天奇的机器学习编译课(免费)

14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
随机推荐
Fiori applications are shared through the enhancement of adaptation project
Use three JS realize the 'ice cream' earth, and let the earth cool for a summer
MySQL中对于索引的理解
redis配置文件中常用配置详解[通俗易懂]
Pytorch sharpening chapter | argmax and argmin functions
Appium automated testing foundation - Supplement: introduction to desired capabilities parameters
MySQL view exercise
LC501. 二叉搜索树中的众数
功能测试报告的编写
Slope compensation
104. SAP ui5 table control supports multi select and how to select multiple table row items at a time with code
nn. Parameter] pytoch feature fusion adaptive weight setting (learnable weight use)
vSphere+、vSAN+来了!VMware 混合云聚焦:原生、快速迁移、混合负载
Single step debugging analysis of rxjs observable of operator
Slope compensation
[literacy] deep / shallow, local / global features in machine learning image processing
14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
Intelligent computing architecture design of Internet
C#/VB. Net to add text / image watermarks to PDF documents
SAP intelligent robot process automation (IRPA) solution sharing