2016-05-28 109 views
0

我使用Homebrew安裝了sbt並正確安裝。我能夠建立項目並完成所有的任務。但是,當我嘗試進入sbt交互模式時,它會顯示下方並退出。對於其他一切,sbt可以正常工作。SBT未進入交互模式

[info] Set current project to sbt_test (in build file:/Users/binshi/sbt_test/) 
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 
+0

您在命令提示符下輸入什麼內容才能進入交互模式?所有你需要做的就是輸入'sbt' – Sergey

+0

是的,我輸入的全部是sbt。然後上面的消息,而不是停止在>提示符下退出。 – binshi

+0

你能否分享一下'build.sbt'的內容,特別是'scalacOptions'部分? – Sergey

回答

0

經過一番周圍挖我發現我的錯誤的源文件在/ usr/local/etc中/ sbtopts。最後,我安裝了一些程序,添加了以下行。

-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled XX:MaxPermSize=256M 

每當sbt啓動上面的行是作爲導致上述錯誤的參數傳遞。由於這些是解決它的java選項,我們可以在上面的行之前添加-J或完全刪除行。然後sbt應該開始正常工作。