Netbeans Scala プラグインで問題が発生しています。プロジェクトを実行すると、次のエラーが発生します。
> 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 を使用していません。第二に、これは私がこのエラーを修正するために行ったことです:
-J-Dscala.home=/usr/local/Cellar/scala/2.10.1/libexec/bin
netbeans.conf の netbeans_default_options に追加されました。これが scalac バイナリの実際のパスだと思います (brew を使用して scala をインストールしました)- 以下を含む作成
~/.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>'
どんな助けでも大歓迎です!!