0

I recently came across Shenandoah GC while working on JVM memory settings. Tried to use in one of our applications with Oracle jdk 16 version and got below error-

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

$ java -version java version "16.0.1" 2021-04-20 Java(TM) SE Runtime Environment (build 16.0.1+9-24) Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

But I read online that Shenandoah GC works with jdk 13 onwards by default and with jdk 12 by using unlock experimental vm options JVM flag.

Linux version- NAME="Oracle Linux Server" VERSION="7.4"

Tried this with Oracle jdk version 1.8.251 also. I am not an expert in JVM so please help me if I am missing something. What could be the issue here?

  • 3
    Does this answer your question? [Can't use Shenandoah GC](https://stackoverflow.com/questions/66333767/cant-use-shenandoah-gc) – Eugene Jun 24 '21 at 14:21
  • Yes. Thanks for that. So any idea in which Oracle jdk version, I can try Shenandoah GC?? – Kotla Manoj Jun 24 '21 at 16:40
  • 1
    No Oracle JDK comes with Shenandoah GC. Oracle deliberately [disables](https://bugs.openjdk.java.net/browse/JDK-8215030) Shenandoah GC in their builds, because they develop a competitive solution - ZGC. If you want to run Shenandoah, try OpenJDK builds from other vendors - Liberica JDK, AdoptOpenJDK etc. – apangin Jun 24 '21 at 19:38
  • Thanks for the suggestion. Will try that. – Kotla Manoj Jun 24 '21 at 20:35

0 Answers0