Scala plugin for netbeans

大兔子大兔子 提交于 2020-01-06 08:57:11

问题


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.


回答1:


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.




回答2:


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.




回答3:


Isn't the error message helpful enough? Did you edit the netbeans.conf file?



来源:https://stackoverflow.com/questions/5128374/scala-plugin-for-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!