同样,不能加载这些JAR文件的多个版本,因为类都位于系统类加载器名称空间中。
Also, you will not be able load multiple versions of these JAR files as the classes will all be in the system class loaders namespace.
这里,我们使用反射的原因是因为我们已经使用非系统类加载器加载了应用程序。
Here, we use reflection because we have loaded the application using a class loader that is not the system class loader.
如果这些类在类路径中可用,URLClassLoader实例的父加载器(即系统类加载器)将加载它们。
If these classes are available in the classpath, the parent of the URLClassLoader instance, which is the system class loader, will load them.
应用推荐