This is because B is not in the classpath of the system class loader or its parent or ancestor class loaders.
这是因为 B 不在系统类装入器或者它的双亲或祖先类装入器的类路径中。
Here, we use reflection because we have loaded the application using a class loader that is not the system class loader.
这里,我们使用反射的原因是因为我们已经使用非系统类加载器加载了应用程序。
Instead, it has a set of class loaders that are unrelated except that they have the same parent (usually the system class loader).
相反,它有一组类装入器,彼此互不相关,但是有共同的双亲(通常是系统类装入器)。
应用推荐