[英]Get a listing of all currently loaded classes in a given JVM instance
It'd be handy to know which classes are currently loaded by a given JVM instance. 知道给定的JVM实例当前正在加载哪些类会很方便。
Is there some way to get them through JVisualVM, for instance? 例如,是否可以通过JVisualVM获得它们?
Edit: I'm aware of the solution given @ Java - Get a list of all Classes loaded in the JVM , yet I'd like to know if there's a way to do that through JVisualVM or some other tool. 编辑:我知道给定的解决方案@ Java- 获取JVM中加载的所有类的列表 ,但是我想知道是否有办法通过JVisualVM或其他工具来做到这一点。 At the moment I'm working against a RCP application, and I'd prefer to not having to run the application through the java
tool (I'm lazy, yes). 目前,我正在处理RCP应用程序,我希望不必通过java
工具运行该应用程序(我很懒,是的)。
Did you try jconsole
? 您尝试过jconsole
吗?
Jconsole should be able to display list of loaded classes, see jConsole Documentation . Jconsole应该能够显示已加载类的列表,请参见jConsole文档 。
See the Viewing Overview Information section, the screenshot shows number of loaded classes. 请参阅“ 查看概述信息”部分,该屏幕截图显示了已加载类的数量。 Plus, you can see a tab called Classes , this is where the class loading info is. 另外,您可以看到一个名为Classes的选项卡,这是类加载信息所在的位置。
You can do this with VisualVM: 您可以使用VisualVM执行此操作:
Your are welcome. 不客气。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.