5

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.

xpapad
  • 4,376
  • 1
  • 24
  • 25

2 Answers2

7

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.

Makoto
  • 104,088
  • 27
  • 192
  • 230
4

The line:

-XX:+UseParallelGC

Enables the ParallelGC. Note the + sign

The line:

-XX:-UseParallelGC

Disables it. Note the - sign.

Wilfred Hughes
  • 29,846
  • 15
  • 139
  • 192
MaurĂ­cio Linhares
  • 39,901
  • 14
  • 121
  • 158