--- a/src/Pure/System/scala.scala Thu Jul 15 16:01:04 2021 +0200
+++ b/src/Pure/System/scala.scala Thu Jul 15 16:35:45 2021 +0200
@@ -79,6 +79,14 @@
/** compiler **/
+ def class_path(): List[String] =
+ Library.distinct(
+ for {
+ prop <- List("isabelle.scala.classpath", "java.class.path")
+ elems = System.getProperty(prop, "") if elems.nonEmpty
+ elem <- space_explode(JFile.pathSeparatorChar, elems) if elem.nonEmpty
+ } yield elem)
+
object Compiler
{
def context(
@@ -89,16 +97,9 @@
File.find_files(dir, file => file.getName.endsWith(".jar")).
map(File.absolute_name)
- val class_path =
- for {
- prop <- List("isabelle.scala.classpath", "java.class.path")
- path = System.getProperty(prop, "") if path != "\"\""
- elem <- space_explode(JFile.pathSeparatorChar, path)
- } yield elem
-
val settings = new GenericRunnerSettings(error)
settings.classpath.value =
- (class_path ::: jar_dirs.flatMap(find_jars)).mkString(JFile.pathSeparator)
+ (class_path() ::: jar_dirs.flatMap(find_jars)).mkString(JFile.pathSeparator)
new Context(settings)
}