xpapad
xpapad

Reputation: 4456

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.

Upvotes: 5

Views: 2308

Answers (2)

Maurício Linhares
Maurício Linhares

Reputation: 40313

The line:

-XX:+UseParallelGC

Enables the ParallelGC. Note the + sign

The line:

-XX:-UseParallelGC

Disables it. Note the - sign.

Upvotes: 4

Makoto
Makoto

Reputation: 106389

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.

Upvotes: 7

Related Questions