as per http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/clopts.html it should be possible to enable -XX: + HeapDumpOnOutOfMemoryError using JConsole at runtime. How?
I assume it is under the MBeans tab and com.sun.management → HotSpotDiagnostic → Operations → setVMOptions?
Yes, you should use setVMOption with " HeapDumpOnOutOfMemoryError" as p0 and " true" as the p1 parameter according to Monitoring and Management of the Java SE 6 Platform Application .
HeapDumpOnOutOfMemoryError
true