I'm trying to run a spring boot application with ZGC Garbage Collector, with following JVM options passed in build.gradle
:
bootRun {
jvmArgs = ["-XX:+UnlockExperimentalVMOptions", "-XX:+UseZGC", "-Xlog:gc*"]
}
While running an app (gradle bootRun
) I'm getting following error:
> Task :bootRun FAILED
Error occurred during initialization of VM
Option -XX:+UseZGC not supported
java -version:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
I'm running 10.15.2 (19C57) version of macOS (Catalina) if that helps. Is it only macOS issue?