File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
repl-embedded/src/scala/tools/repl Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,13 @@ object EmbeddedReplMain {
6666 def main (args : Array [String ]): Unit = {
6767 // Get the location of the current jar to use as classpath
6868 val codeSource = getClass.getProtectionDomain.getCodeSource
69- val jarPath = System .getProperty(" java.class.path" )
7069
7170 // Add -classpath argument pointing to the shaded jar itself
7271 // This allows the ReplDriver's compiler to find scala.* classes
7372 val argsWithClasspath = if (args.exists(arg => arg == " -classpath" || arg == " -cp" )) {
7473 args // Already has classpath
7574 } else {
76- Array (" -classpath" , jarPath ) ++ args
75+ Array (" -classpath" , System .getProperty( " java.class.path " ) ) ++ args
7776 }
7877
7978 // Create the unshading classloader with the current classloader as parent
@@ -91,8 +90,6 @@ object EmbeddedReplMain {
9190 " " // extraPredef: String
9291 )
9392
94- // Call tryRunning on the ReplDriver
95- val tryRunningMethod = replDriverClass.getMethod(" tryRunning" )
96- tryRunningMethod.invoke(replDriver)
93+ replDriverClass.getMethod(" tryRunning" ).invoke(replDriver)
9794 }
9895}
You can’t perform that action at this time.
0 commit comments