Heap Analysis Tool 1.1 (HAT)

HAT has now been included with Java SE. Starting with Java SE 6, HAT has been replaced with jhat, which is included with the standard Sun distribution. HAT is not being maintained in a stand-alone configuration. Source code for jhat is available with the current release of Java SE.

As of this writing, Java SE 6 ("Mustang") is the current version, so the most recent version of jhat can be found at the Mustang product page at https://mustang.dev.java.net/. More background can be found in three blog entries, here, here and here. The page you're reading now has the old version of HAT, which it is obsolete; we recommend using the improved version in Java SE. The old version of HAT is mostly of historical interest. The project page for the old version still exists under java.net, at http://java.net/projects/hat/.

Description

The Heap Analysis Tool (HAT) helps to debug unnecessary object retention (sometimes called "memory leaks") by providing a convenient means to browse the object topology in a heap snapshot, which is generated by the Java VM. HAT reads a hprof file, then sets itself up as a web server--therefore allowing you to run queries against a heap dump contained within the hprof file.

A complete description of the capabilities of the tool is given in the README file.

Note: This is not a product. The Heap Analysis Tool is part of a research and development project and is being released as interesting, but unsupported, technology that may be of use as a debugging aid for Java developers.

Downloads

Binary Distribution
Source Distribution

Difficulties have been reported downloading these distributions with Explorer. If you have trouble, please try another browser, such as FireFox.

To install, pick a directory where you'd like to install hat, and unzip the zip file (either hat_bin.zip or hat_src.zip). There's a bin directory that contains a shell script and a batch file for launching; you might want to copy these where you install software on your system. I use ~/bin on my Mac and c:/bin on PCs. You might need to edit the startup script to point to the hat.jar file that contains the program binary.

More Information

Documentation README file
History and Release Notes
HAT License
Possible Donation Ideas

Miscellaneous

A little utility called "NetDumper" lets you grab a heap dump from a remote JVM. It's described here.