I'm interested in the language Scala and would like to test it with NetBeans Can 6.8. I've downloaded Scala 2.8.0 final und unzipped it to my hard drive. Then I installed the Scala plugin for NetBeans and created a first project. Naturally compilation failed with this message:
You must set
SCALA_HOME
or environment property and append "-J-Dscala.home=scalahomepath
" property to the end of "netbeans_default_options
" inNetBeansInstallationPath/etc/netbeans.conf
to point to Scala installation directory.
I read what the NetBeans Wiki and the Scala website say to the plugin.
$SCALA_HOME
that points to D:\Tools\scala-2.8.0.final
$SCALA_HOME\bin
to my path variablenetbeans.conf
file by adding "-J-Dscala.home=D:\Tools\scala-2.8.0.final
" to the end of netbeans_default_optionsWith your great help this error was fixed. However there are two new problems:
After creating a Scala Object this
package scalaapplication1
object te {
}
is not accepted. NetBeans complains that
type ScalaObject is not a member of package Scala
Strange: the Netbeans Wiki on Scala doesn't mention "scala.home
", only the environment variable SCALA_HOME
.
So does the tutorial on Scala plugin installation:
After that, you need to make sure Netbeans is launched from a new dos session (one that has registered the new environment variable definition), and is "path-aware" (like this issue 175394, even though it only concerns Unix platform).
DarrenWang mentions in his article the NBModules plugins to more easily manage those options like "-J-Dscala.home = scalahomepath
" in the netbeans.conf
file.
But it experienced some crashed with the Scala plugin and the latest Netbeans.
Can you read Chinese? hehe, I wrote down something here: http://www.zeuux.com/group/scalaba/bbs/content/4240/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With