public boolean isJava18Compatible() {
    return javaSpecVersionNumber.getMajor() >= 18;
  }
Tells whether the Java version is compatible with Java 18.

@since 2.0
@return whether the Java version is compatible with Java 18
spock-core/src/main/java/spock/util/environment/Jvm.java