I am using JMAP to create a heap dump of JVM while executing a Java program. Then using JHAT I am opening the dump details in the browser.
Now, I can see many details of the memory dump, but I don't know how to simply look at the program variable values and their values. Can you please guide me here? I need to use only command line to display the variable names and values.
Thanks in advance!
Browser is more friendly, you can find a quick tutorial here
http://petermodzelewski.blogspot.in/2013/06/short-jhat-tutorial-diagnosing.html
For command line usage
http://docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html
[EDIT]
Step 1: Keep you application Running
Step 2: Find the process id (pID --say 4416)
Step 3: Run below command from (JDKHOME)
After running this, you should get a message saying
Step 4: Start jHat by executing following command (
You should get a message saying
Step 5: Open the browser for :
Step 6 : By default, link to all classes are shown
Step 7: Search your class ( find option of browser)
Step 8 : Clicking on the link should take to a page where you can see all the variables, references, sub classes and its memory usage
-