2020-01-15 Java 中Run-time Built-in Class Loaders

Run-time Built-in Class Loaders

The Java run-time has the following built-in class loaders:

1. Bootstrap class loader. 

It is the virtual machine's built-in class loader, typically represented as null, and does not have a parent.

2. Platform class loader

All platform classes are visible to the platform class loader that can be used as the parent of a ClassLoader instance. Platform classes include Java SE platform APIs, their implementation classes and JDK-specific run-time classes that are defined by the platform class loader or its ancestors.

To allow for upgrading/overriding of modules defined to the platform class loader, and where upgraded modules read modules defined to class loaders other than the platform class loader and its ancestors, then the platform class loader may have to delegate to other class loaders, the application class loader for example. In other words, classes in named modules defined to class loaders other than the platform class loader and its ancestors may be visible to the platform class loader.

3. System class loader

It is also known as application class loader and is distinct from the platform class loader. The system class loader is typically used to define classes on the application class path, module path, and JDK-specific tools. The platform class loader is a parent or an ancestor of the system class loader that all platform classes are visible to it.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom阅读 7,604评论 0 3
  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie阅读 8,006评论 0 3
  • 我发现走进档次比较高的店铺心里就会很紧张。很容易被老板说动买什么东西。那个时候脑子是懵的。一方面心理害怕觉得自己不...
    何仙姑的胭脂水粉阅读 1,755评论 0 0
  • 最近听说了一个好消息,《舌尖上的中国3》准备在大年初四开播了!趁着这股美食风潮,我也来细细品味一些吃过的海鲜。 这...
    金叶覆银光阅读 3,301评论 3 3
  • 自然界中已发现的矿物虽已超过3000种,但可做宝石原料的仅230余种,而国际珠宝市场上的主要高中档宝石只不过20多...
    007_许阅读 3,188评论 0 0