【问题标题】:What is the scala 2.13 interpreter main class?什么是 scala 2.13 解释器主类?
【发布时间】:2019-08-27 02:16:52
【问题描述】:

如果我在 PATH 中没有 scala 命令,或者我想专门运行 sbt 项目的 scala 版本-- 没有 使用 sbt console-- 什么是 @ 987654323@ 用于 Scala 2.13?

【问题讨论】:

    标签: scala sbt scala-2.13


    【解决方案1】:

    您可以在构建中看到它:https://github.com/scala/scala/blob/2.13.x/build.sbt#L1086

    “scala.tools.nsc.MainGenericRunner”

    【讨论】:

    • 你真的能把它放在一个runMain中吗?我得到了一个没有找到的课程。我在 intellij 控制台启动中看到它,但它不在 scaladocs 中:scala-lang.org/api/2.13.0/scala-compiler/scala/tools/nsc/…
    • MainGenericRunner 在 scala-compiler.jar(不是 scala-library.jar)中,所以尝试runMain 它将失败(找不到类),除非编译器 JAR 在您的类路径中跨度>
    猜你喜欢
    • 2019-12-19
    • 1970-01-01
    • 2015-02-13
    • 1970-01-01
    • 1970-01-01
    • 2021-09-29
    • 1970-01-01
    • 1970-01-01
    • 2020-12-04
    相关资源
    最近更新 更多