We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8efca1d commit bd06fadCopy full SHA for bd06fad
compiler/src/dotty/tools/scripting/Main.scala
@@ -33,6 +33,8 @@ object Main:
33
val (compilerArgs, scriptFile, scriptArgs, saveJar, invokeFlag) = distinguishArgs(args)
34
val driver = ScriptingDriver(compilerArgs, scriptFile, scriptArgs)
35
try driver.compileAndRun { (outDir:Path, classpathEntries:Seq[Path], mainClass: String) =>
36
+ // write expanded classpath to java.class.path property, so called script can see it
37
+ sys.props("java.class.path") = classpathEntries.map(_.toString).mkString(pathsep)
38
if saveJar then
39
// write a standalone jar to the script parent directory
40
writeJarfile(outDir, scriptFile, scriptArgs, classpathEntries, mainClass)
0 commit comments