标签:def int ace ssl 图片 stat main default sel
public class ClassLoaderTest{
public static void main(String[] args){
// 系统类加载器
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
System.out.println(systemClassLoader); // sun.misc.Launcher$AppClassLoader@2a139a55
//获取系统类加载器的上级:扩展类加载器
ClassLoader extClassLoader = systemClassLoader.getParent();
System.out.println(extClassLoader); // sun.misc.Launcher$ExtClassLoader@7852e922
// 获取本类的加载器
ClassLoader selfClassLoader = ClassLoaderTest.class.getClassLoader();
System.out.println(selfClassLoader); // sun.misc.Launcher$AppClassLoader@2a139a55
}
}
标签:def int ace ssl 图片 stat main default sel
原文地址:https://www.cnblogs.com/nedrain/p/13230988.html