FULL JDK VERSION(S):
java version "1.4.2_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_15-b02)
Java HotSpot(TM) Client VM (build 1.4.2_15-b02, mixed mode)
java version "1.5.0_13-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-ea-b01)
Java HotSpot(TM) Server VM (build 1.5.0_13-ea-b01, mixed mode)
(This only applies to 5.0 and 1.4.2, since the HeapDumpOnCtrlBreak code does not exist in Java 6.)
The -XX:HeapDumpPath=[path/filename] option only works for heapdumps produced by the -XX:+HeapDumpOnOutOfMemoryError functionality. It has no effect on dumps produced by HeapDumpOnCtrlBreak.
This is because the HeapDumpPath option is only used in the code that handles OutOfMemoryErrors (report_java_out_of_memory())- it is not queried by the SIGQUIT/SIGBREAK handling code (signal_thread_entry()).
The SIGQUIT/SIGBREAK handling code should be modified such that it picks up the path specified in the -XX:HeapDumpPath=[path/filename] option.