From 3ad3f87212b04cec81f841bddef557b58967c2e6 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sat, 4 Feb 2017 22:14:51 -0700 Subject: [PATCH] Future proof against removal of java.ext.dirs in Java 9 This is the start of an effort to make SBT 0.13.x compatible with JDK 9. The system property java.ext.dirs no longer exists now that JEP-220 has removed the extension and endorsed classpath facilities. It is also forbidden to manually set this to an empty string from the command line. This commit treats the absense of this property as an empty extension classpath. --- compile/src/main/scala/sbt/compiler/CompilerArguments.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/src/main/scala/sbt/compiler/CompilerArguments.scala b/compile/src/main/scala/sbt/compiler/CompilerArguments.scala index 295bae5bb..df279bb37 100644 --- a/compile/src/main/scala/sbt/compiler/CompilerArguments.scala +++ b/compile/src/main/scala/sbt/compiler/CompilerArguments.scala @@ -63,7 +63,7 @@ final class CompilerArguments(scalaInstance: xsbti.compile.ScalaInstance, cp: xs def bootClasspathFor(classpath: Seq[File]) = bootClasspath(hasLibrary(classpath)) import Path._ - def extClasspath: Seq[File] = (IO.parseClasspath(System.getProperty("java.ext.dirs")) * "*.jar").get + def extClasspath: Seq[File] = (IO.parseClasspath(System.getProperty("java.ext.dirs", "")) * "*.jar").get } object CompilerArguments { val BootClasspathOption = "-bootclasspath"