提交 284e3122 编写于 作者: U uxiahnan

再谈类的加载器格式调整及错误修正 by vector at 2021年5月1日19:05:07

上级 e1ecea76
......@@ -13,7 +13,7 @@ JVM支持两种类型的类加载器,分别为引导类加载器(Bootstrap C
```java
class ClassLoader{
ClassLoader parent;//父类加载器
ClassLoader parent;//父类加载器
public ClassLoader(ClassLoader parent){
this.parent = parent;
}
......@@ -56,7 +56,7 @@ class ChildClassLoader extends ClassLoader{
- Java:由C++演变而来,(C++)–版,单继承
```java
System.out.println"**********启动类加载器**********");
System.out.println("**********启动类加载器**********");
// 获取BootstrapclassLoader能够加载的api的路径
URL[] urLs = sun.misc.Launcher.getBootstrapcLassPath().getURLs();
for (URL element : urLs) {
......@@ -85,7 +85,7 @@ System.out.println(classLoader);
![在这里插入图片描述](https://gitee.com/vectorx/ImageCloud/raw/master/img/20210501170650.png)
```java
System.out.println"***********扩展类加载器***********");
System.out.println("***********扩展类加载器***********");
String extDirs =System.getProperty("java.ext.dirs");
for (String path :extDirs.split( regex:";")){
System.out.println(path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册