Yes, use -XX:+PrintClassHistogram and depending on your OS send the java program a QUIT signal. The Heap will then be dumped along with the Thread dump.Windows: Ctrl-breakUnix: Ctrl-/orkill -QUIT <process id>
Also in 1.6 you can issue a heap dump from jconsoleSee the section HotSpot Diagnostic MXBean at http://download.java.net/jdk6/docs/technotes/guides/management/jconsole.html.