我使用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工作?
答案 0 :(得分:0)
检查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"想法 - 壳