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?