Java ClassLoader ??????????
???????????? ???????[ 2015/3/24 11:11:46 ] ????????Java ClassLoader JDK
???????????ClassLoader?
???????????????????д?????Java??????????????CS????BS??????????????.class????????????????????Java??ó???????????????????????????ó???????????????????????????????????Щ????????????????class??????У??????????????class?????????????????class????е???????????????????????????????????????????????????????????????????????????????????class????????????????????????Java???????????ClassLoader??????????????class???????浱?е????????class??????????????????????????class?????á?????ClassLoader?????????????class???????浱??????
????????Java???????????ClassLoader
????BootStrap ClassLoader???????????????????Java????????ж????????????????????JDK?е????????磺rt.jar??resources.jar??charsets.jar???????????3?????????????????Щ?????????????jar??class?????
????URL[]urls=sun.misc.Launcher.getBootstrapClassPath().getURLs();
????for(int i=0;i<urls.length;i++){
????System.out.println(urls[i].toExternalForm());
????}
??????????????????????????JDK??????????????
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/lib/resources.jar
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/lib/rt.jar
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/lib/sunrsasign.jar
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/lib/jsse.jar
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/lib/jce.jar
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/lib/charsets.jar
????file:/C:/Program%20Files/Java/jdk1.6.0_22/jre/classes/
????????????????????????sun.boot.class.path?????????????????
????System.out.println(System.getProperty("sun.boot.class.path"));
????????????C:Program FilesJavajdk1.6.0_22jrelib
esources.jar;C:Program FilesJavajdk1.6.0_22jrelib
t.jar;C:Program FilesJavajdk1.6.0_22jrelibsunrsasign.jar;C:Program FilesJavajdk1.6.0_22jrelibjsse.jar;C:Program FilesJavajdk1.6.0_22jrelibjce.jar;C:Program FilesJavajdk1.6.0_22jrelibcharsets.jar;C:Program FilesJavajdk1.6.0_22jreclasses
????Extension ClassLoader????????????????????????Java??????????????JAVA_HOME/jre/lib/ext/??μ?????jar??
????App ClassLoader?????????????????????????ó???classpath???μ?????jar??class?????
???????????Java???????????ClassLoader???????????????????????????ClassLoader??????Щ??????ClassLoader??????????java.lang.ClassLoader???????Java???????????ClassLoader??Extension ClassLoader??App ClassLoader???????????Bootstrap ClassLoader???????ClassLoader???????????????????Java???????C++??д?????????JVM?????У???JVM?????Bootstrap ClassLoader????????????????????????????????Extension ClassLoader??App ClassLoader?????????
????????ClassLoader??????????
????1????????
????ClassLoader????????????????????????????ClassLoader???????????????????????????????е?????????????????????????????????????????Bootstrap ClassLoader????????и????????????????????????ClassLoader?????????????????????ClassLoader??????????????????????????????????????????????????????и???????????????????????????????????μ?????????????????????Bootstrap ClassLoader???????????????????????????????Extension ClassLoader???????????????????????????App ClassLoader???м????????????м?????????????????е??????????????????????????????URL?м????????????????м?????????????????ClassNotFoundException??????????????????????????????壬?????????????浱?У????????????????е?Class???????
????2?????????????????????????
??????????????????????????????????????????????????б????ClassLoader???????Ρ????????????????????????£?????????????????????????????????????????String????????java????api?ж??????????????????????????????????????е????????????????????????String????????????????????????Bootstrcp ClassLoader????????????????????ClassLoader?????????????????д??String??????????JDK??ClassLoader??????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11