The file option is used by dump agents that write to a file.
java -Xgcpolicy:metronome -Xdump:heap:events=vmstop,file=my.dmp
You can use tokens to add context to dump file names. See Dump agent tokens for more information.
The location for the dump is selected from these options, in this order:
If the directory does not exist, it will be created.
If the dump cannot be written to the selected location, the JVM will fall-back to the following locations, in this order: