Scala67

Contents


Get Started with NetBeans 6.7

  1. Install the latest Scala runtime via Scala's home
  2. Set SCALA_HOME to the installed Scala runtime
  3. Add $SCALA_HOME/bin to PATH environment variable
  4. Get the NetBeans 6.7 from: http://www.netbeans.org/downloads/
  5. Get the Scala plugins binary from: http://sourceforge.net/projects/erlybird/files/nb-scala/6.7v1/nb-scala-6.7v1.zip/download
  6. Unzip Scala plugin binary to somewhere
  7. Open NetBeans, go to "Tools" -> "Plugins", click on "Downloaded" tab title, click on "Add Plugins..." button, choose the directory where the Scala plugins are unzipped, select all listed *.nbm files, following the instructions. Restart IDE.
  8. If you encountered "... Could not connect to compilation daemon.", try to run "fsc" or "scala" under a command/terminal window first.
  9. If this problem persists, check your /etc/hosts file to make sure the first line reads as follows
  • 127.0.0.1 localhost HOSTNAME
  • Where HOSTNAME is your computer name

Set $SCALA_HOME and $PATH

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
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo