开发者

Setting Scala "Platform" for NetBeans 6.8 on Ubuntu Lucid Lynx

开发者 https://www.devze.com 2023-01-02 15:16 出处:网络
I\'m trying to use NetBeans 6.8 with Scala, and it can\'t find the \"Scala Platform\" (whatever that is supposed to be). I\'m using Ubuntu Lucid Lynx (fully updated).

I'm trying to use NetBeans 6.8 with Scala, and it can't find the "Scala Platform" (whatever that is supposed to be). I'm using Ubuntu Lucid Lynx (fully updated).

The libraries are in /usr/share/java, the binaries in /usr/bin, the docs in /usr/share/doc/scala-doc/, and the sources are uninstalled. I think that NetBeans is looking for Scala to be in one single directory (with bin, lib, etc.开发者_运维问答). I created /usr/share/scala and placed links to the other directories, but it still didn't quite make it.

Can someone straighten me out? (And why is it a "platform"? More needless jargon...)


As the installation instructions for the plugin explain, you must set the SCALA_HOME environment variable to the directory where you have Scala installed.

So, first download and install the latest release candidate of Scala 2.8.0 somewhere on your system (I like to put it in /usr/local/scala myself). A good place to put the environment variable is in /etc/environment. Add a line like this to that file:

SCALA_HOME=/usr/local/scala

You need to log out and back in to let this take effect.

(Note: Scala 2.8 final is most likely to be released soon, and it contains a lot of new features and changes since 2.7. In my opinion it's best to use the 2.8 release candidates, don't bother too much with the soon to be obsolete version 2.7).


The point is that if you installed Scala via apt-get / Synaptic, you don't have Scala 2.8 but 2.7.X, and the NetBeans plugin is made only for 2.8. You can check which version of Scala you are running with the command:

scala -version

While Scala 2.8 isn't available in the Ubuntu repository, you can work with the Scala IDE plugin for Eclipse, which works with 2.7.X or if you prefer IntelliJ IDEA instead of Eclipse, they also have a good plugin for Scala.

By Scala Platform it meant the installment of Scala in your Ubuntu.


If you haven't tried downloading the full Scala package from scala-lang.org, you should do so and then point Tools > Scala Platform > Platform Folder at that directory. I am not sure what Ubuntu does to the normal Scala distribution, but it hasn't kept up very well with maintenance releases and it certainly hasn't kept up with new releases (2.8.0.RCx, for example), so I've been downloading Scala myself.

For instance, on my laptop I have /usr/local/lib/scala-2.8 pointing at some place that I've unzipped scala-2.8.0.RC2.zip, and have set the Platform Folder directory to that link (I'm using 2.8 there, obviously).


Have you followed the install instructions at: http://wiki.netbeans.org/Scala68v1#Install_with_NetBeans_6.8

I think the NetBeans 6.8 plugin needs a 2.8.x version of Scala to work properly.

0

精彩评论

暂无评论...
验证码 换一张
取 消