Difference between revisions of "Scala In Uni Labs"
From mi-linux
Jump to navigationJump to search (New page: To get Scala and Netbeans working in the University labs, first add these lines to your <code>~/.bashrc</code> file: <nowiki> export SCALA_HOME=/opt/scala-2.8.1.final export PATH=$PATH:...) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | == Sorting out environment variables == | |
− | + | * To get Scala and Netbeans working in the University labs, first add these lines to your <code>~/.bashrc</code> file: | |
+ | |||
+ | <nowiki> | ||
export SCALA_HOME=/opt/scala-2.8.1.final | export SCALA_HOME=/opt/scala-2.8.1.final | ||
export PATH=$PATH:/opt/scala-2.8.1.final/bin | export PATH=$PATH:/opt/scala-2.8.1.final/bin | ||
− | alias netbeans='netbeans J-Dscala.home=/opt/scala-2.8.1.final/ | + | alias netbeans='netbeans J-Dscala.home=/opt/scala-2.8.1.final/' |
− | + | </nowiki> | |
− | Reload your <code>~/.bashrc</code> file in the usual way: | + | * Reload your <code>~/.bashrc</code> file in the usual way: |
− | + | <nowiki> | |
$ source ~/.bashrc | $ source ~/.bashrc | ||
− | + | </nowiki> | |
− | From now on you '''MUST''' start Netbeans from the command line, like this: | + | * From now on you '''MUST''' start Netbeans from the command line, like this: |
− | + | <nowiki> | |
$ netbeans | $ netbeans | ||
− | + | </nowiki> | |
not from the Applications menu. Also, you may see an error message about the Scala directory, just ignore this. | not from the Applications menu. Also, you may see an error message about the Scala directory, just ignore this. | ||
+ | |||
+ | == Installing the plugins == | ||
+ | |||
+ | * Remember the version of Netbeans installed in the lab is '''2.8''' | ||
+ | * Get the Scala plugins from here: http://sourceforge.net/projects/erlybird/files/nb-scala/6.8v1.1.0rc2b/ | ||
+ | * Save them somewhere and unzip them (right click on the .zip file and select '''Extract here'''). | ||
+ | * Open Netbeans from the command line: | ||
+ | |||
+ | <nowiki> | ||
+ | $ netbeans | ||
+ | </nowiki> | ||
+ | |||
+ | Ignore any error messages about the Scala directories. | ||
+ | |||
+ | * Go to '''Tools -> Plugins''' on the menu. | ||
+ | * Select the '''Downloaded''' tab. | ||
+ | * Click on the '''Add plugins''' button. | ||
+ | * In the dialog box that opens up, go to the directory where you unzipped the Scala plugins. Select '''ALL''' the files in the directory and press '''OK'''. | ||
+ | * Say yes to all the questions and install. | ||
+ | * Close Netbeans and open it up again (from the command line!). |
Latest revision as of 14:32, 7 February 2011
Sorting out environment variables
- To get Scala and Netbeans working in the University labs, first add these lines to your
~/.bashrc
file:
export SCALA_HOME=/opt/scala-2.8.1.final export PATH=$PATH:/opt/scala-2.8.1.final/bin alias netbeans='netbeans J-Dscala.home=/opt/scala-2.8.1.final/'
- Reload your
~/.bashrc
file in the usual way:
$ source ~/.bashrc
- From now on you MUST start Netbeans from the command line, like this:
$ netbeans
not from the Applications menu. Also, you may see an error message about the Scala directory, just ignore this.
Installing the plugins
- Remember the version of Netbeans installed in the lab is 2.8
- Get the Scala plugins from here: http://sourceforge.net/projects/erlybird/files/nb-scala/6.8v1.1.0rc2b/
- Save them somewhere and unzip them (right click on the .zip file and select Extract here).
- Open Netbeans from the command line:
$ netbeans
Ignore any error messages about the Scala directories.
- Go to Tools -> Plugins on the menu.
- Select the Downloaded tab.
- Click on the Add plugins button.
- In the dialog box that opens up, go to the directory where you unzipped the Scala plugins. Select ALL the files in the directory and press OK.
- Say yes to all the questions and install.
- Close Netbeans and open it up again (from the command line!).