Login using Social Account
     Continue with GoogleLogin using your credentials
Note: You can skip this page if you are okay with using CloudxLab environment. Instructions below are for installing Scala on your PC.
Since Scala code is compiled to Java Bytecodes, Scala installation requires Java Software Development Kit (SDK) installed on the machine.
On CloudxLab, Scala is already installed and readily available in the right-hand side frame. The right-hand side frame is essentially Jupyter which is an online environment for programming, analytics and machine learning.
If you want to use scala elsewhere you might have to go for the installation as outlined below.
Java Installation
java –version
in terminalSet Your Java Environment
Here, java-current is the directory where java is installed
export JAVA_HOME=/usr/local/java-current
Add java to the path
export PATH=$PATH:$JAVA_HOME/bin/
Install Scala
Download Scala from http://www.scala-lang.org/downloads.
The version downloaded file will look like - scala-
Unpack Scala binary
cd ~/Downloads
tar -xvf scala-2.12.7.tgz
sudo mv scala-2.12.7 /usr/local/
sudo chmod -R 755 /usr/local/scala-2.12.7/bin
export SCALA_HOME=/usr/local/scala-2.12.7/
export PATH=$PATH:$SCALA_HOME/bin
Add the last 2 lines from above in .profile or .bash_profile to set the paths permanently.
Now run, scala
command and you should get scala prompt.
$ scala
Welcome to Scala 2.12.7 (OpenJDK 64-Bit Server VM, Java 10.0.2).
Type in expressions for evaluation. Or try :help.
scala> print("Hello");
Hello
scala>
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Answer is not availble for this assesment
Loading comments...