Install Scala

Install Java first, set JAVA_HOME, see java-env-setup. Check installation -

mmahmood@ubuntu:~$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Server VM (build 20.4-b02, mixed mode)

Download Scala from Scala Website

sudo tar -C /opt/ -xvzf ~/Desktop/scala-2.9.2.tgz
sudo chmod -R 777 /opt/scala-2.9.2/
sudo vi /etc/bash.bashrc

Add these line to set SCALA_HOME:

export SCALA_HOME=/opt/scala-2.9.2/bin

Save and Quit vi, then

mmahmood@ubuntu:~$ source /etc/bash.bashrc

Check installed version:

mmahmood@ubuntu:~$ scala -version
Scala code runner version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL

Now CODE!!!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License