Plugins for Scala are currently under development. Here is an overview of what you can currently do with Scala in NetBeans IDE, as well as instructions for getting started.
There are two ways to get started with Scala plugin for NetBeans:
http://wiki.netbeans.org/Scala68v1
Scala modules are experimental and under active developing, other than the beta binary, you can also try cutting edge features via development version of NetBeans. Development versions are nightly built and change rapidly, please check updates frequently too via "Tool"->"Plugins"->"Reload Catalog" (update all available modules, including those not relating to Scala). Sometime, the underlying APIs changed, and things are broken, you have to re-download a new nightly build and try ...
The plugin kit has packaged a most recent stable Scala Development Kit (2.7.3 currently), but it always better have your own Scala Development Kit installed, please follow steps:
1. Set $SCALA_HOME and $PATH
Set your $SCALA_HOME environment variable, for example: /Users/dcaoyuan/apps/scala/share/scala/ (which contains sub-directory: bin, lib etc), to tell NetBeans using which Scala library to build your project.
Add $SCALA_HOME/bin to your $PATH environment is also a necessary now, to use "fsc" instead of "scalac"
1a. Set $SCALA_HOME for MacOS X Applications
If you $SCALA_HOME environment variable is not visible for your Applications/NetBeans, see Here
2. Set scala.home property
If you've set SCALA_HOME properly, but still encounter path error, you can try to set scala.home property: append "-J-Dscala.home=/path/to/your/scala/home" (for Windows users, try to append "-J-Dscala.home=%SCALA_HOME%") to the end of "netbeans_default_options" in your netbeans.conf file, where, "/path/to/your/scala/home" is your Scala home's absolute path. netbeans.conf is located at "pathToNetBeansInstallationDirectory/etc", in Mac OSX, it could be: /Applications/NetBeans/NetBeans\ 6.0.app/Contents/Resources/NetBeans/etc, or ~/SomePath/netbeans/etc
3. Download Scala standard source files
Download Scala standard source jar files via http://www.scala-lang.org/downloads/index.html, unpack it (do not unzip source jar files any more). Will look like
+ src + sbaz-src.jar + scala-compiler-src.jar + scala-dbc-src.jar + scala-decoder-src.jar + scala-library-src.jar
The Maven plugins for NetBeans works with Scala plugins, thus, Lift web application development is supported under NetBeans now.
To get Maven plugins for NetBeans, you can:
All source code is available at: http://hg.netbeans.org/main/contrib, organized as:
main
+ contrib
+ libs.scala
+ scala.console
+ scala.debug
+ scala.debug.projects
+ scala.editor
+ scala.kit
+ scala.platform
+ scala.project
+ scala.stdplatform
+ xtc
NetBeans' scala pluings are under NetBeans' structured source tree, that is, you should have whole Netbeans main source to build it. The steps are:
# check/set ANT_OPTS, make sure it has enough memory setting, for example: # ANT_OPTS='-Xmx1024M -XX:PermSize=1024M -XX:MaxPermSize=1024M' mkdir nbsrc cd nbsrc hg clone http://hg.netbeans.org/main cd main hg clone http://hg.netbeans.org/main/contrib # make sure you are under nbsrc/main directory, then build NetBeans itself first: ant clean build # then, build all scala plugins by: cd contrib/scala.kit ant scala-clean ant scala-build ant scala-nbm # after "ant scala-nbm", all scala nbm* will be under directory: contrib/scala.kit/build
If you have a project that want to debug into Scala's compiler, library sources, you could do when in debugging: In debugging, open debugging source windows via: "Windows" -> "Debugging" -> "Sources". Go through the listed source jars, find ".../scala-compiler.jar" and ".../scala-library.jar", check them.
![]() |
Please see Change log for latest progressing.
There is a Google group for Scala for NetBeans
Check/Submit issues under top-level Component "languages" and "scala" subcomponent in NetBeans Issuezilla
| ScalaBuild.diff | ![]() |
11713 bytes |
| ScalaEditor_080729.png | ![]() |
234136 bytes |