当前位置:网站首页>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
边栏推荐
- [C language] detailed explanation of malloc function [easy to understand]
- 104. SAP UI5 表格控件的支持复选(Multi-Select)以及如何用代码一次选中多个表格行项目
- LC501. 二叉搜索树中的众数
- [untitled]
- 切面条 C语言
- 【扫盲】机器学习图像处理中的深层/浅层、局部/全局特征
- Ffmpeg learning notes
- The second anniversary of the three winged bird: the wings are getting richer and the take-off is just around the corner
- 【JetCache】JetCache的使用方法与步骤
- 深度学习--数据操作
猜你喜欢

Intelligent computing architecture design of Internet

YOLOv5.5 调用本地摄像头

Single step debugging analysis of rxjs observable of operator

C#/VB. Net to add text / image watermarks to PDF documents

Dark horse programmer - software testing - stage 06 2-linux and database-01-08 Chapter 1 - description of the content of the Linux operating system stage, description of the basic format and common fo

MySQL MHA high availability configuration and failover

正则系列之量词(Quantifiers)

104. SAP ui5 table control supports multi select and how to select multiple table row items at a time with code
![[jetcache] how to use jetcache](/img/fa/5b3abe53bb7e9db6af2dbb1cb76a31.png)
[jetcache] how to use jetcache

MySQL中对于索引的理解
随机推荐
14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
Pytorch nn. functional. Simple understanding and usage of unfold()
使用 Three.js 实现'雪糕'地球,让地球也凉爽一夏
JVM有哪些类加载机制?
效率提升 - 鼓捣个性化容器开发环境
447-哔哩哔哩面经1
内存导致的电脑游戏中显示hdmi无信号 从而死机的情况
Pytorch sharpening chapter | argmax and argmin functions
Efficiency improvement - encourage personalized container development environment
pytorch训练自己网络后可视化特征图谱的代码
【QT小作】封装一个简单的线程管理类
[literacy] deep / shallow, local / global features in machine learning image processing
元宇宙可能成为互联网发展的新方向
下班前几分钟,我弄清了v-model与.sync的区别
Intelligent computing architecture design of Internet
Congratulations on the release of friends' new book (send welfare)
Measurement of reference loop gain and phase margin
Slope compensation
Cloud Vulnerability Global Database
Resttemplate remote call tool class