Read Java Heap Dump (.hprof file) using eclipse MAT api -


i tying read information java class , no of instance, it's size etc java heap dump.i using eclipse mat jar files in program read heap dump file.while running program getting nullpointerexception.

below given code accessing heap dump file

public static void main(string[] args) throws snapshotexception {         isnapshot isnapshot = snapshotfactory.opensnapshot(new file("path to\\heap_dmp.hprof"), new voidprogresslistener());         collection<iclass> classes = isnapshot.getclasses();         system.out.println(" size = "+classes.size());     } 

while running above program getting exception

exception in thread "main" java.lang.exceptionininitializererror     @ heapanalyser.heapanalyser.main(heapanalyser.java:16) caused by: java.lang.nullpointerexception     @ org.eclipse.mat.snapshot.snapshotfactory.<clinit>(snapshotfactory.java:84)     ... 1 more 

can explain how programatically analyse heap dumps


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -