I am dumping heap (OpenJDK 7) on OOM with
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/jvm.hprof
startup opts for my VM. I dont have enough space on the disk and cant afford to store multiple dumps (heap size is 6g). Is there a way to force JVM to overwrite the dump file? Currently it will complain about 'file exists' and leave the existing dump intact. I have read Sun's docs but there doesnt seem to be any option to force overwrite