2013-04-05 72 views
0

我遇到Netbeans Scala plugin問題。運行我的項目時,我得到了以下錯誤:

所有的
> ant -f /Volumes/Z/Users/vincent/Dropbox/Programming/Scala/U4Handler run Could not load definitions from resource scala/tools/ant/antlib.xml. It could not be found. init: deps-jar: 
> /Volumes/Z/Users/vincent/Dropbox/Programming/Scala/U4Handler/nbproject/build-impl.xml:405: 
> The following error occurred while executing this line: 
> /Volumes/Z/Users/vincent/Dropbox/Programming/Scala/U4Handler/nbproject/build-impl.xml:238: 
> Problem: failed to create task or type scalac Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. 
> BUILD FAILED (total time: 0 seconds) 

首先,我爲什麼帶參數運行ant -f不知道,我沒有在這個項目中使用Ant。其次,這是我做了這個錯誤修正:

  1. 添加到netbeans.conf中-J-Dscala.home=/usr/local/Cellar/scala/2.10.1/libexec/bin netbeans_default_options,我相信這是scalac二進制文件的實際路徑
  2. 創建(我使用BREW安裝階) ~/.MacOSX/environment.plist含有(重新啓動之後):
<plist version="1.0"> 
<dict> 
<key>SCALA_HOME</key> 
<string>/usr/local/Cellar/scala/2.10.1/libexec/bin</string> 
<key>PATH</key> 
<string>/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/Cellar/scala/2.10.1/libexec/bin</string> 
</dict> 
</plist>' 
  • 試過thisthis了,但沒有工作。
  • 任何幫助非常感謝!

    回答

    1

    廣泛的谷歌搜索後,我發現這傢伙誰可以解釋這一切: Solution