本文介绍了获取 JVM 中所有类加载器的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以获取 JVM 中所有类加载器的列表,或者至少获取与 Java EE 服务器(在我的情况下为 WebLogic)中的 Web 应用程序相关联的所有类加载器的列表.

Is it possible to get a list of all class loaders in a JVM or at least all class loaders associated with web apps in a Java EE Server (WebLogic in my case).

推荐答案

关于类加载器层次结构的很好的概述位于:

There are good overviews on the class loader hierarchy at:

http://e-docs.bea.com/wls/docs81/programming/classloading.html 的存档版本

http://weblogic.sys-con.com/node/42876

你可以使用

ClassLoader.getParent()

遍历您当前应用程序的应用程序解析树,但您确实无法查看子应用程序的类加载器.

to walk through you current application's applications resolution tree, but you really can't look through the children app's class loaders.

这篇关于获取 JVM 中所有类加载器的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 07:58