1

On mac I am trying to use Shenandoah on java with the flags:

-XX:ShenandoahGCHeuristics=compact and -XX:+UseShenandoahGC

and I get the same error on java 13 and 12:

Unrecognized VM option 'ShenandoahGCHeuristics=compact' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

and the error:

Error occurred during initialization of VM Option -XX:+UseShenandoahGC not supported

Does anyone know the reason for this or how to fix it?

baitmbarek
  • 2,440
  • 4
  • 18
  • 26
sheroo
  • 11
  • 2
  • 1
    Maybe this helps: https://developers.redhat.com/blog/2019/04/19/not-all-openjdk-12-builds-include-shenandoah-heres-why/ – Marvin Jan 12 '20 at 10:30

1 Answers1

2

My guess would be that you are using the OpenJDK binary that does not include Shenandoah. Today, the only vendor who does not ship Shenandoah in their binaries is Oracle (those builds you get at jdk.java.net). Try to pick up any other OpenJDK distribution: your OS package manager, AdoptOpenJDK, SAPMachine, Amazon Corretto, etc.

Aleksey Shipilev
  • 18,599
  • 2
  • 67
  • 86