2
在Linux上测试我的jar应用程序时,我使用下面的命令行来跟踪特定对象(例如JButton)的使用情况/内存负载。在Windows上使用特定对象时的jmap -histo
jmap -histo:live <pid> | grep JButton
导致:
35: 24 11136 javax.swing.JButton
99: 31 2728 javax.swing.JButton$AccessibleJButton
现在我想要做与Windows相同的,但我不能找到一个类似的命令(如grep)来跟踪特定对象。 jmap -histo[:live] <pid>
提供了所有对象的完整列表。 Windows是否有类似的工具用于这种用法或替代方式?
https://superuser.com/questions/300815/grep-equivalent-for-windows-7 – Eugene
你可以使用['find'JButton“'](https://technet.microsoft.com/en-us /library/bb490906.aspx)。请注意,引号是必需的。 – Holger
@Holger我刚测试过它,工作得很好。非常感谢你。 – Zerthimon