Netbeans 的 Scala 插件
我尝试在 NetBesans 6.9.1 下运行 scala 插件。我从 arch linux 存储库安装 scala。然后我下载 netbeans-6.9.1 和 scala 插件。安装的插件。当我使用 hello world 创建 scala 应用程序并尝试构建时,出现错误:
You must set SCALA_HOME or environment property and append "-J-Dscala.home=scalahomepath"
property to the end of "netbeans_default_options" in NetBeansInstallationPath/etc/netbeans.conf to point to
Scala installation directory.
我该如何修复它?
我放入了 netbeans.conf J-Dscala.home=/usr/bin/scala 但它没有帮助。之后我收到错误:无法从资源 scala/tools/ant/antlib.xml 加载定义。找不到。
谢谢。
I try to run scala plugin under NetBesans 6.9.1. I install scala from arch linux repositories. Then i download netbeans-6.9.1 and scala plugin. Installed plugin. When i create scala application with hello world and try it to build i get error:
You must set SCALA_HOME or environment property and append "-J-Dscala.home=scalahomepath"
property to the end of "netbeans_default_options" in NetBeansInstallationPath/etc/netbeans.conf to point to
Scala installation directory.
How can i fix it?
I put in my netbeans.conf J-Dscala.home=/usr/bin/scala but it's not helpful. After that i get error: Could not load definitions from resource scala/tools/ant/antlib.xml. It could not be found.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不想在 netbeans 中设置 scala 时弄乱 linux 中的环境变量,那么:
无论您在何处找到“scala-library.jar”
,复制该位置并将“J-Dscala.home”分配给 就是这样
例如
“J-Dscala.home=/home/username/project/.../scala2.8.1”
。
这对我来说很有效
在你的情况下尝试一下。
If you don't want to mess up with the environment variables in linux while setting up scala in netbeans then:
search for "scala-library.jar"
wherever you find it, copy that location and assign "J-Dscala.home" to that
for example
"J-Dscala.home=/home/username/project/.../scala2.8.1"
that's it.
It worked out for me
try it in your case.
我没有安装 Arch Linux,但查看 scala 包内容 我想SCALA_HOME 的正确值为
/usr/share/scala
。I do not have Arch Linux installed, but looking at scala package contents I think the proper value for SCALA_HOME is
/usr/share/scala
.错误消息还不够有帮助吗?您是否编辑了 netbeans.conf 文件?
Isn't the error message helpful enough? Did you edit the netbeans.conf file?