To enable the option you need + and disable the option you need -
What is misleading regarding the documentation is that it shows the default setting so that it "clears" the settings that you already have. Those with + are turned on by default, and those who have - are disabled by default. This means that if you copy any of the + or - options from the documentation, they should not do anything (except when the default value has changed over time)
-XX: -HeapDumpOnOutOfMemoryError disables the heap dump, which is the default.
-XX: + HeapDumpOnOutOfMemoryError enables a heap dump.
Peter Lawrey
source share