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.
This commit is contained in:
Jason Zaugg 2017-02-04 22:14:51 -07:00
parent 33e7cbc907
commit 3ad3f87212
1 changed files with 1 additions and 1 deletions

View File

@ -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"