【问题标题】:SBT main class "not" not found未找到 SBT 主类“未”
【发布时间】:2022-01-16 11:48:09
【问题描述】:

当我尝试在我的新 Mac 上的任何项目上运行 sbt 时,我看到了一个奇怪的问题。这些都是众所周知的好项目,所以它很可能与我的新机器上的 sbt 相关(使用 brew install sbt 安装)。

正如您在下面看到的 something 是“not[newline]found”,这会导致“Could not find or load main class not”错误。我不知道这是什么或为什么会发生,以前有人见过吗?

sbt -v
[sbt_options] declare -a sbt_options='([0]="-Dsbt.jse.engineType=Node" [1]="-Dsbt.jse.command=node" [2]="not" [3]="found")'
[process_args] java_version = '8'
# Executing command line:
java
-Dfile.encoding=UTF-8
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
-Dsbt.jse.engineType=Node
-Dsbt.jse.command=node
not
found
-jar
/usr/local/Cellar/sbt/1.5.6/libexec/bin/sbt-launch.jar

Error: Could not find or load main class not

【问题讨论】:

  • 使用 coursier 安装它,看看是否能解决问题。
  • @LuisMiguelMejíaSuárez 谢谢你,成功了!

标签: scala sbt


【解决方案1】:

感谢@LuisMiguelMejíaSuárez 的回答帮助我们完成了这项工作。

  1. 已卸载 brews 版本的 sbt (brew uninstall sbt)
  2. 已安装 coursier CLI (https://get-coursier.io/docs/cli-installation)
  3. 通过 coursier (cs install sbt) 安装了 sbt。

【讨论】:

    猜你喜欢
    • 2018-02-21
    • 2013-05-16
    • 2016-11-21
    • 2014-01-13
    • 2018-11-11
    • 1970-01-01
    • 2018-04-15
    • 2016-12-10
    • 2011-11-12
    相关资源
    最近更新 更多