[英]Why the classes loaded by different custom classloaders can't invoke each other
为什么它们彼此隔离并且只能使用它们自己和它们的父母加载的类,尽管它们都存储在共享的方法区中
Classes loaded in different branches of a class loader tree cannot call each other directly as they don't have access to the classes or interfaces in branches they don't have.在类加载器树的不同分支中加载的类不能直接相互调用,因为它们无权访问它们没有的分支中的类或接口。 What they can do is use reflection, or call via a common interface or superclass.
他们可以做的是使用反射,或者通过公共接口或超类进行调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.