If I don't have the scala
command in the PATH, or I wanted to specifically run the sbt project's scala version-- without using sbt console
-- what would be the sbt runMain
for scala 2.13?
Asked
Active
Viewed 126 times
0

Fernando Rezk
- 314
- 1
- 18

SourceSimian
- 682
- 4
- 18
1 Answers
3
You can see it in the build: https://github.com/scala/scala/blob/2.13.x/build.sbt#L1086
"scala.tools.nsc.MainGenericRunner"

som-snytt
- 39,429
- 2
- 47
- 129
-
Are you actually able to put that in a runMain? I get a class not found. I see it in the intellij console startup, but it isn't in the scaladocs: https://www.scala-lang.org/api/2.13.0/scala-compiler/scala/tools/nsc/index.html – SourceSimian Aug 23 '19 at 19:43
-
1`MainGenericRunner` is in scala-compiler.jar (not scala-library.jar) so trying to `runMain` it will fail (class not found) unless the compiler JAR is on your classpath – Seth Tisue Aug 23 '19 at 20:22