presto-main/src/main/java/io/prestosql/server/PrestoSystemRequirements.java/PrestoSystemRequirements/verifyJavaVersion
class PrestoSystemRequirements:    private static void verifyJavaVersion()
    {
        String javaVersion = StandardSystemProperty.JAVA_VERSION.value();
        if (javaVersion == null) {
            failRequirement("Java version not defined");
        }

        JavaVersion version = JavaVersion.parse(javaVersion);

        if (version.getMajor() >= 11) {
            return;
        }

        if ((version.getMajor() == 8 && version.getUpdate().isPresent() && version.getUpdate().getAsInt() >= 161) ||
                (version.getMajor() > 8 && version.getMajor() < 11)) {
            warnRequirement("Future versions of Presto will require Java 11+ (found: %s)", javaVersion);
            return;
        }

        failRequirement("Presto requires Java 8u161+ (found %s)", javaVersion);
    }