Fix build failure with JDK 9 EA b148 (#470)

diff --git a/.travis.sh b/.travis.sh
index d75ce17..c391c1c 100755
--- a/.travis.sh
+++ b/.travis.sh
@@ -85,6 +85,9 @@
   mvn -V -B -e verify -Dbytecode.version=1.8
   ;;
 9-ea | 9-ea-stable)
+  # Groovy version should be updated to get rid of "--add-opens" options (see https://twitter.com/CedricChampeau/status/807285853580103684)
+  export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
+
   # see https://bugs.openjdk.java.net/browse/JDK-8131041 about "java.locale.providers"
   mvn -V -B -e verify -Dbytecode.version=1.9 \
     -DargLine=-Djava.locale.providers=JRE,SPI
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java
index 0849f77..1135548 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java
@@ -11,6 +11,9 @@
  *******************************************************************************/
 package org.jacoco.core.runtime;
 
+import org.junit.Assume;
+import org.junit.BeforeClass;
+
 /**
  * Unit tests for {@link URLStreamHandlerRuntime}.
  */
@@ -21,4 +24,11 @@
 		return new URLStreamHandlerRuntime();
 	}
 
+	@BeforeClass
+	public static void checkJDK() {
+		final boolean jdk9 = System.getProperty("java.version")
+				.startsWith("9-");
+		Assume.assumeTrue(!jdk9);
+	}
+
 }