title: Using -XX:HeapDumpPath option but want to integrate the process id
body: <p>When using <code>-XX:+HeapDumpOnOutOfMemoryError</code> the JVM will not overwrite the heap dump if there is already a dump file under the specified path. I want to be able to have multiple heap dumps in a non-default location, and was planning on using the pid in the heap dump path in order to allow that. </p>
  
  <p>However, when I tried to specify the argument like so:</p>
  
  <pre><code>-XX:HeapDumpPath=some/heapdump/path/heapdump-%p.hprof
  </code></pre>
  
  <p>And then created a heap dump, I got <code>%p</code> and not the actual pid in the file name. However, the use of <code>%p</code> seems to work with the <code>-XX:OnOutOfMemoryError</code> option. Is there some other syntax that I'm supposed to use for <code>-XX:HeapDumpPath=</code>?</p>