【问题标题】:idea SBT Shell window failed to initidea SBT Shell 窗口初始化失败
【发布时间】:2017-09-30 04:25:14
【问题描述】:

我正在使用 Idea Community 2017.2.1 进行 Scala 编程工作。 SBT Shell 无法以某种方式工作。
失败的消息输出如下:

/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=55888,suspend=n,server=y -server -Xmx1536M -XX:MaxPermSize=768M -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 -Didea.runid=2017.2 -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" -jar "/Users/lorancechen/Library/Application Support/IdeaIC2017.2/Scala/launcher/sbt-launch.jar" idea-shell
Error occurred during initialization of VM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=768M; support was removed in 8.0
agent library failed to init: jdwp
ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.

Process finished with exit code 1

SBT build.properties 设置sbt.version=0.13.16

此外,SBT 版本设置为1.0.2(最新版本)也不起作用,与失败消息不同,SBT Shell 窗口为黑色且不包含任何信息。

如何使 SBT Shell 工作?

【问题讨论】:

    标签: scala intellij-idea sbt


    【解决方案1】:

    检查 IDE 中的插件设置。 -agentlib:jdwp=... 在 SBT 命令行中指定了两次。错误信息中直接说明了这一点:

    错误:无法两次加载此 JVM TI 代理,请检查您的 java 命令行是否有重复的 jdwp 选项。

    /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=55888,suspend=n,server= y -server -Xmx1536M -XX:MaxPermSize=768M -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 -Didea.runid=2017.2 -Dfile.encoding=UTF -8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" -jar "/Users/lorancechen/Library/Application Support/IdeaIC2017.2/Scala/launcher/sbt-launch.jar" 想法-shell

    【讨论】:

    • 只是为了细节:检查首选项 -> 构建工具 -> SBT -> VM参数,然后删除-agentlib:jdwp=...
    猜你喜欢
    • 2020-09-04
    • 2016-12-29
    • 1970-01-01
    • 2016-03-25
    • 2012-11-17
    • 2017-12-10
    • 2018-09-17
    • 1970-01-01
    • 2018-10-13
    相关资源
    最近更新 更多