package Day02_Demo.Demo04;/*
@create 2020--12--23--16:16
*/
import org.junit.Test;
/**
* 演示拓展类加载器,项目/bin
*/
public class ClassLoaderDemo3 {
//jdk中固定的配置信息,sun.boot.class.path用于引导类的加载器所加载的内容
@Test
public void test1() {
String paths = System.getProperty("java.class.path");
String[] str = paths.split(";");
for (String s : str) {
System.out.println(s);
}
}
@Test
//确定拓展类的加载器,类型:launcher$ExtClassLoader
public void test2() {
ClassLoader parent = ClassLoaderDemo3.class.getClassLoader().getParent();
System.out.println(parent);
}
}