一、类加载器定义

从作用的角度来认识类加载器:(根据API文档)

1.类加载器是一个负责加载类的对象,而ClassLoader是一个抽象类。类加载器将xxx.class文件加载到JVM,生成xxx的Class对象。(Class详见反射 点击这里)

2.类加载器被安全管理器用来表示安全范围。

二、类加载器种类及工作原理

主要有三 :

1.Bootstrap Loader(引导加载器):负责加载%JAVA_HOME%/jre/lib下的核心jar

2.Extended Loader(扩展加载器):负责加载%JAVA_HOME%/jre/lib/ext下的扩展jar

3.AppClass Loader(应用加载器):负责加载该应用程序CLASSPATH下的jar和.class文件

工作原理:

  每一个类加载器都有一个与之关联的上级类加载器,类加载器加载器类时使用委托机制。当需要加载一个类时,它首先将该任务委托给上级加载器,如果上级加载器没能加载到,然后再自行加载,这是一个递归的过程。应用加载器的上级是扩展加载器,扩展加载器的上级是引导加载器,而引导加载无上级加载器。

三、类加载器的安全管理

  JVM为每个类加载器维护了一个名字空间,每个名字空间只能加载一个同名的类,不同名字空间可加载同名的类。在JVM中,同一个名字空间下的类可以直接交互,不同则不可以。如果a加载器和b加载器都加载了A类,那么a加载器下的类要访问A类,那么一定是访问的a加载器下的A类。这样,通过类加载器就可以进行安全管理。

  举个例子:我们自己写了一个类叫java.lang.String和类库里的String的全限定名一模一样。现在在代码中出现了String类,需要加载,过程如下。

    >首先这个任务是应用加载器的,根据委托机制,应用加载器将任务委托给上级扩展加载器。

      >扩展加载器接收到该任务,将任务委托给上级引导加载器。

        >引导加载器加载在核心类库中寻找java.lang.String,找到了,加载,生成Class对象。

        >引导加载器将结果返回给扩展加载器。

      >扩展加载器将结果返回给应用加载器。

    >应用加载器得到结果。

  应用加载器的到的结果是引导加载器从核心类库中加载的java.lang.String 并没有加载到我们自己写的String。这样就保证了安全性。java其他很多类都依赖String 类,如果加载了我们自己写的String就会造成严重的问题。类加载器的委托机制就提供了很好的安全防护。

  在例如:我们写了一个类叫java.lang.Hello,java核心类库中并不存在这个类,但它的所属的包结构却是java.lang,而同一个包下的类具有访问protected成员的权限,(protected详细解析 点击这里)这样就又会造成一些安全问题。分析一下类加载器加载Hello类的过程,按照上面的委托机制可以确定,引导、扩展加载器范围内并没有这个类,最后Hello是被应用加载器加载的,那么这个类是在应用加载器的名字空间下。开头已经给出,不同名字空间下的类不能直接交互,那么此处的java.lang.Hello并不能像核心类库的java.lang包下的类一样拥有protected的访问权限。类加载器的委托机制再一次提供了安全保护。

四、自定义类加载器

  通过反射加载一个不存在的类

@Test
public void funxx() throws ClassNotFoundException {
Class.forName("xxx");
}

  异常栈:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhIAAADRCAYAAACZ3luMAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAEhZSURBVHhe7Z19jCTHddjfyaItJKDhwElw7PVeMAoC6HikCIazympNDkknAQzQxCgb7Qb2GhaP4jkgOeSugXgXoiSeTlLCzNqxd+UBCOQsEZQ0Er3LbDQh6AQO/Efmj81COzShOJYTwNJAt9wmkURO7ESmTVpi3quq7q7+qq7u6fnaeb+7ws5MdVfX56tXr153n7vjjjveAUvefPNN9QngqaeeUp8YhmEYhplVCisSN998s/rEMAzDMMys8i71l2EYhmEYJjesSDAMwzAMUxhWJBiGYRiGKQwrEgzDMAzDFGZoisS599wMP/TBfyoCwzAMwzBnk6EpEu+c+yH1KS8VWNvZg72dNfw0Hmqb471+EaYxz2cH1Wc3a+r72YD7FMMwNgzPInHTX1GfAv7exR/Apz76lyLcVvm++pWxowabeyjYtTCOeauytiOvn3jx8idU/3qRMOlz9rTmO6AC8476yDAMY2BkPhI/chPAP6q9BT9530/DB+/5B/Dz//BtFROlD+2NVVjdaOMnhpCTUgOghfWyGoSjxR1YG9dysdooeVKUilJymj0serjs210VNcm4Hdiainwn1T2PQ4Zh7BiZIvEXqDe88/234a/92F+HH//x8/DOD9IUCSZEbROadYDOVnwS6m5vQHscUt7tQc8lXWITpyCGYRhmlhmeInHTe+Tft4OnYX7/++/AO3/+Z/DW//s/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GEmG97aYAaCHMXELW50i+KkvUSKGZhpaF8/jwjdYso7awwzWliRYBiGYRimMLy1wTAMwzBMYViRYBiGYRimMKxIMAzDMAxTGFYkGIZhGIYpDCsSDMMwDMMUhhUJhmEYhmEKw4oEwzAMwzCFYUWCYRiGYZjCsCLBMAzDMExhWJFgGIZhGKYwrEgwDMMwDFMYViQYhmEYhikMKxIMwzAMwxSGFQmGYRiGYQrDigTDMAzDMIVhRYJhGIZhmMKwIsEwDMMwTEEA/j9f0iN5QSKDOgAAAABJRU5ErkJggg==" alt="" />

  loaderClass源码:

 protected Class<?> loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
synchronized (getClassLoadingLock(name)) {
// First, check if the class has already been loaded
Class<?> c = findLoadedClass(name);
if (c == null) {
long t0 = System.nanoTime();
try {
if (parent != null) {
c = parent.loadClass(name, false);
} else {
c = findBootstrapClassOrNull(name);
}
} catch (ClassNotFoundException e) {
// ClassNotFoundException thrown if class not found
// from the non-null parent class loader
} if (c == null) {
// If still not found, then invoke findClass in order
// to find the class.
long t1 = System.nanoTime();
c = findClass(name); // this is the defining class loader; record the stats
sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0);
sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
sun.misc.PerfCounter.getFindClasses().increment();
}
}
if (resolve) {
resolveClass(c);
}
return c;
}
}

  分析以上信息,可以发现,ClassLoader加载类是通过loadClass()方法完成的,其工作流程如下:

  1.调用findLoadedClass()查看该类是否被加载过,如果没有,返回null

  2.如果findLoadedClass()返回null,那么使用委托机制进行类加载。

  3.如果getParent().loadClass() != null , 表明加载成功,否则调用本类的findClass()方法进行加载。

  由此可见,我们自定义一个类加载器,只需要继承ClassLoader,并重写其findClass()方法即可。

  下面是个人写的一个ClassLoader

package cn.edu;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException; public class CustomizedClassLoader extends ClassLoader{ private String classpath; public CustomizedClassLoader() { } public CustomizedClassLoader(String classpath) {
this.classpath = classpath;
} //当loaderClass没有找到该类时,会自动调用此方法寻找类。
@Override
public Class<?> findClass(String name) throws ClassNotFoundException {
try {
byte[] data = this.getBytesData(name); //获取.class文件的字节数组
if(data == null) {
throw new ClassNotFoundException("找不到类:" + name);
}
return this.defineClass(name, data, 0, data.length); //loaderClass继承的方法,该方法通过字节数组生成Class对象
}catch(IOException e){
throw new ClassNotFoundException("找不到类:" + name);
}
} //读取.class文件,返回字节数组,若读取到的内容为空,则返回null
private byte[] getBytesData(String name) throws IOException{
name = name.replace(".", "//") + ".class"; //解析binary name,得到文件绝对路径
File file = new File(classpath,name);
byte[] res = this.readFile(file);
if(res.length == 0) { //字节数组为空,返回null
return null;
}
return res;
} //读取指定文件,返回字节数组,若找不到该文件,则IO异常
private byte[] readFile(File file) throws IOException{
FileReader reader = new FileReader(file);
BufferedReader bufferedReader = new BufferedReader(reader);
String str = null;
String res = "";
while( (str = bufferedReader.readLine()) != null) {
res += str;
}
return res.getBytes();
}
}

五、Tomcat的类加载器

  Tomcat有两类类加载器,一类是服务器类加载器,用于加载${CATALINA_HOME}/lib目录下的jar,这些是web容器所依赖的jar。还有一类是应用类加载器,加载${CONTEXT_PATH}/WEB-INF下的lib和class目录,用于加载该应用所依赖的jar和class。这两种类加载器,不适用委托机制,在应用需要加载类时,首先由应用加载器加载,加载失败再由服务器加载器加载,并且class目录优先于lib目录。并且每一个应用都有一个对应的类加载器加载。所以在给项目导入jar时应该注意不能导入与服务器类库有冲突的jar。

    本文个人编写,水平有限,如有错误,恳请指出,欢迎讨论分享。

类加载器 ClassLoder详解的更多相关文章

  1. 类加载器 - ClassLoader详解

    获得ClassLoader的途径 获得当前类的ClassLoader clazz.getClassLoader() 获得当前线程上下文的ClassLoader Thread.currentThread ...

  2. 系统批量运维管理器Fabric详解

    系统批量运维管理器Fabric详解 Fabrici 是基于python现实的SSH命令行工具,简化了SSH的应用程序部署及系统管理任务,它提供了系统基础的操作组件,可以实现本地或远程shell命令,包 ...

  3. GridBagLayout布局管理器应用详解

    http://www.cnblogs.com/kungfupanda/p/7220217.html GridBagLayout布局管理器应用详解 很多情况下,我们已经不需要通过编写代码来实现一个应用程 ...

  4. java8学习之收集器用法详解与多级分组和分区

    收集器用法详解: 在上次已经系统的阅读了Collector收集器的Javadoc对它已经有一个比较详细的认知了,但是!!!它毕境是只是一个接口,要使用的话还得用它的实现类,所以在Java8中有它进行了 ...

  5. ffmpeg播放器实现详解 - 视频显示

    ffplay是ffmpeg源码中一个自带的开源播放器实例,同时支持本地视频文件的播放以及在线流媒体播放,功能非常强大. FFplay: FFplay is a very simple and port ...

  6. 不止面试—jvm类加载面试题详解

    面试题 带着问题学习是最高效的,本次我们将尝试回答以下问题: 什么是类的加载? 哪些情况会触发类的加载? 讲一下JVM加载一个类的过程 什么时候会为变量分配内存? JVM的类加载机制是什么? 双亲委派 ...

  7. Kubernetes K8S之调度器kube-scheduler详解

    Kubernetes K8S之调度器kube-scheduler概述与详解 kube-scheduler调度概述 在 Kubernetes 中,调度是指将 Pod 放置到合适的 Node 节点上,然后 ...

  8. 『动善时』JMeter基础 — 35、JMeter接口关联【JSON提取器】详解

    目录 1.JSON提取器介绍 2.JSON提取器界面详解 3.JSON提取器的使用 (1)测试计划内包含的元件 (2)HTTP Cookie管理器内容 (3)用户登陆请求界面内容 (4)JSON提取器 ...

  9. 【Java虚拟机9】类加载器之命名空间详解

    前言 前面介绍类加载器的时候,介绍了一下命名空间这个概念.今天就通过一个例子,来详细了解一下[类加载器的命名空间].然后通过这个例子,我们可以总结一下双亲委托模型的好处与优点. 例1(不删除class ...

随机推荐

  1. Heka配置讲解

    基于Heka,ElasticSearch和Kibana的分布式后端日志架构 目前主流的后端日志都采用的标准的elk模式(Elasticsearch,Logstash,Kinaba),分别负责日志存储, ...

  2. React v15.5.0更新说明 & v16.0.0更新预告

    React今日发布了15.5.0版本,同时这也将是以15开头的最后一个版本,下一次发布,我们将迎来React 16.0.0 在15.5.0这一版本中,主要有以下两处改动: 独立React.PropTy ...

  3. OC Nsstring的使用

    // // main.m // NSString // // Created by mj on 13-4-5. // Copyright (c) 2013年 itcast. All rights re ...

  4. BZOJ3245:最快路线(最短路)

    Description 精明的小R每每开车出行总是喜欢走最快路线,而不是最短路线.很明显,每条道路的限速是小R需要考虑的关键问题.不过有一些限速标志丢失了,于是小R将不知道能开多快.不过有一个合理的方 ...

  5. VOC 数据集

    可变形网络 :https://github.com/msracver/Deformable-ConvNets VOC数据集: Test 参数 ('PascalVOC', '2007_test', '. ...

  6. 转:git 的常用命令

    转自:阮一峰 常用git命令清单 一般来说,日常使用只要记住下图6个命令,就可以了.但是熟练使用,恐怕要记住60-100个命令. 下面是我整理的常用 Git 命令清单.几个专用名词的译名如下. Wor ...

  7. REG小探

    根键名称缩写对照表   常用数据类型

  8. MS12-020蓝屏攻击

    MS12-020远程桌面协议RDP拒绝访问漏洞 条件:受害者必须开放RDP协议 开放了3389端口 或者端口改了,知道对方RDP开放的对应端口. 过程:MSF利用 MSF显示为seems down说明 ...

  9. ASP.NET SignalR 与 LayIM2.0 配合轻松实现Web聊天室 实战系列(内容已过期,阅读请慎重)

    项目简介 利用ASP.NET SignalR技术与Layim前端im框架实现的一个简单的web聊天室,包括单聊,群聊,加好友,加群,好友搜索,管理,群组管理,好友权限设置等功能.涉及技术: Elast ...

  10. JSP的域对象的作用范围

    <%-- Created by IntelliJ IDEA. User: tT丶 Date: 2017-12-12 Time: 14:53 To change this template use ...