--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java 2017-03-20 17:38:38.000000000 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java 2017-03-20 17:38:37.000000000 -0700 @@ -23,6 +23,7 @@ package org.graalvm.compiler.hotspot; import java.util.Formatter; +import java.util.Objects; /** * Mechanism for checking that the current Java runtime environment supports the minimum JVMCI API @@ -37,10 +38,11 @@ class JVMCIVersionCheck { private static final int JVMCI8_MIN_MAJOR_VERSION = 0; - private static final int JVMCI8_MIN_MINOR_VERSION = 23; + private static final int JVMCI8_MIN_MINOR_VERSION = 24; - // Will be updated once an ea build with the required JVMCI API is available. - private static final int JVMCI9_MIN_EA_BUILD = 143; + // MAX_VALUE indicates that no current EA version is compatible with Graal. + // Note: Keep README.md in sync with the EA version support checked here. + private static final int JVMCI9_MIN_EA_BUILD = 161; private static void failVersionCheck(boolean exit, String reason, Object... args) { Formatter errorMessage = new Formatter().format(reason, args); @@ -116,7 +118,11 @@ if (build >= JVMCI9_MIN_EA_BUILD) { return; } - failVersionCheck(exitOnFailure, "The VM is an insufficiently recent EA JDK9 build for Graal: %d < %d.%n", build, JVMCI9_MIN_EA_BUILD); + if (Objects.equals(JVMCI9_MIN_EA_BUILD, Integer.MAX_VALUE)) { + failVersionCheck(exitOnFailure, "This version of Graal is not compatible with any JDK 9 Early Access build.%n"); + } else { + failVersionCheck(exitOnFailure, "The VM is an insufficiently recent EA JDK9 build for Graal: %d < %d.%n", build, JVMCI9_MIN_EA_BUILD); + } return; } failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +