【问题标题】:Scala plugin Netbeans 7.3 $SCALA_HOMEScala 插件 Netbeans 7.3 $SCALA_HOME
【发布时间】:2013-04-05 13:51:32
【问题描述】:

我遇到了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/binnetbeans_default_options,我相信这是scalac二进制文件的实际路径(我使用brew安装了scala)
  2. 创建的~/.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>'
  1. 已经尝试过thisthis,但没有成功。

非常感谢任何帮助!

【问题讨论】:

    标签: scala netbeans-7


    【解决方案1】:

    经过广泛的谷歌搜索,我找到了一个解释这一切的人: Solution

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-09
      • 2013-05-15
      • 2019-11-23
      • 1970-01-01
      相关资源
      最近更新 更多