package J20250805.demo03;

/**
 * @author WanJl
 * @version 1.0
 * @title ClassLoaderTest
 * @description
 * @create 2025/8/5
 */
public class ClassLoaderTest {
    public static void main(String[] args) {
        //当前类的类加载器
        //ClassLoader classLoader = ClassLoaderTest.class.getClassLoader();
        //通过当前类的类加载器---获取父类加载器，获取系统类加载器
        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader() ;
        //获取系统类加载器的父类，平台类加载器
        ClassLoader platformClassLoader = systemClassLoader.getParent();
        //获取平台类加载器的父加载器---启动类加载器
        ClassLoader boostrapClassLoader = platformClassLoader.getParent();
        //System.out.println("当前类加载器："+classLoader);
        System.out.println("系统类加载器："+systemClassLoader);
        System.out.println("平台类加载器："+platformClassLoader);
        System.out.println("启动类加载器："+boostrapClassLoader);


    }
}
