Hi, Im not familiar with heap dumps so i apologize if this isnt helpful...
http://blogs.sun.com/roller/page/alanb?entry=heap_dumps_are_back_with
If you don't want big dump files in the application working directory then the HeapDumpPath option can be used to specify an alternative location - for example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated in the /disk2/dumps directory.
https://hat.dev.java.net/doc/README.html
For example, to run the program Main and generate a binary heap profile in the file dump.hprof, use the following command:
java -Xrunhprof:file=dump.hprof,format=b Main
also:
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/hotspot.html
-XX:+HeapDumpOnOutOfMemory
The HeapDumpOnOutOfMemory command line option causes the JVM to dump a snapshot of the Java heap when an Out Of Memory error condition has been reached. The heap dump format generated by HeapDumpOnOutOfMemory is in hprof binary format, and is written to filename java_pid<pid>_<.hprof in the current working directory. The option -XX:HeapDumpPath=<file>_< can be used to specify the dump filename or the directory where the dump file is created. Running with application with -XX:+HeapDumpOnOutOfMemoryError does not impact performance. Please note the following known issue: The HeapDumpOnOutOfMemory option does not work with the low-pause collector (-XX:+UseConcMarkSweepGC). This option is available starting with the 1.4.2.11 and 1.5.0.04 releases.