When using -XX:+HeapDumpOnOutOfMemoryError the JVM will not overwrite the heap dump if there is already a dump file under the specified path. I want to be able
-XX:+HeapDumpOnOutOfMemoryError
That can be a path to a file OR directory. If you have a path to a directory, the generated file name will have pid in it by default.
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html