Search code examples
javajvm-arguments

Difference between -XX:-UseParallelGC and -XX:+UseParallelGC


What is the difference between -XX:+UseParallelGC and -XX:-UseParallelGC? Most links indicate the first, but http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html mentions the second.

Thank you.


Solution

  • From the documentation:

    Boolean options are turned on with -XX:+<option> and turned off with -XX:-<option>

    So it means that -XX:+UseParallelGC will turn on the parallel garbage collection, and -XX:-UseParallelGC will turn it off.