若是要即时动态生成heapdump文件可使用jmap命令,jdk6.0已取消了-XX:+HeapDumpOnCtrlBreak配置参数经过ctrl+break的方式。 jmap -dump:format=b,file=temp_heapdump.hprof <pid>orm