2

While testing my jar application at Linux I use the command line below to track the usage/memory load of a specific object (eg JButton).

jmap -histo:live <pid> | grep JButton

Which results:

35:            24          11136  javax.swing.JButton
99:            31           2728  javax.swing.JButton$AccessibleJButton

Now I'm trying to do the same with Windows but I cannot find a similar command (like grep) to track a specific object. jmap -histo[:live] <pid> provides a full list of all objects. Does Windows have similar tools for such usage or an alternate way?

Zerthimon
  • 435
  • 1
  • 9
  • 19

1 Answers1

3

I tested the suggestions from comments and we have an answer now:

jmap -histo:live <pid> | grep JButton

from Linux is equivalent to:

jmap -histo:live <pid> | find "JButton"

or

jmap -histo:live <pid> | findstr JButton

from Windows.

Zerthimon
  • 435
  • 1
  • 9
  • 19