hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java
--- a/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java Fri Aug 11 23:12:11 2017 +0000
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java Fri Aug 11 17:36:26 2017 -0700
@@ -88,7 +88,19 @@
}
public static ResolvedJavaMethod resolveIntrinsic(MetaAccessProvider metaAccess, VMIntrinsicMethod intrinsic) throws ClassNotFoundException {
- Class<?> c = Class.forName(intrinsic.declaringClass.replace('/', '.'), false, CheckGraalIntrinsics.class.getClassLoader());
+ Class<?> c;
+ try {
+ c = Class.forName(intrinsic.declaringClass.replace('/', '.'), false, CheckGraalIntrinsics.class.getClassLoader());
+ } catch (ClassNotFoundException ex) {
+ try {
+ Class.forName("javax.naming.Reference");
+ } catch (ClassNotFoundException coreNamingMissing) {
+ // if core JDK classes aren't found, we are probably running in a
+ // JDK9 java.base environment and then missing class is OK
+ return null;
+ }
+ throw ex;
+ }
for (Method javaMethod : c.getDeclaredMethods()) {
if (javaMethod.getName().equals(intrinsic.name)) {
ResolvedJavaMethod method = metaAccess.lookupJavaMethod(javaMethod);