Scala Setup

Scala Setup

Note: The following sections contain information about all the tools you will need to complete the course. If you have problems following through it or prefer watching videos, check the Tools Setup videos in the Getting StartedSection.

Oracle JDK, the Java Development Kit, version 1.8. Note some assignments may work with Java 1.7, but we grade the assignments with 1.8, so we strongly recommend to use Java 1.8. Check you have the right version by typing in the console:

java -version


Ubuntu, Debian: To install the JDK using apt-get, execute the following command in a terminal sudo apt-get install openjdk-8-jdk

Fedora, Oracle, Red Had: To install the JDK using yum, execute the following command in a terminal su -c “yum install java-1.8.0-openjdk-devel”

Manual Installation: To install the JDK manually on a Linux system, follow these steps:

1. Download the .tar.gz archive from the Oracle website
2. Unpack the downloaded archive to a directory of your choice
3. Add the bin/ directory of the extracted JDK to the PATH environment variable. Open the file ~/.bashrc in an editor (create it if it doesn’t exist) and add the following line:

export PATH=”/PATH/TO/YOUR/jdk1.8.0-VERSION/bin:$PATH”

If you are using another shell, add that line in the corresponding configuration file (e.g. ~/.zshrc for zsh).

Verify your setup: Open a new terminal (to apply the changed ~/.bashrc in case you did the manual installation) and type java -version. If you have problems installing the JDK, ask for help on the forums.

Mac OS X

Mac OS X either comes with a pre-installed JDK, or installs it automatically.

To verify your JDK installation, open the Terminal application in /Applications/Utilities/ and type java -version. If the JDK is not yet installed, the system will ask you if you would like to download and install it. Make sure you install Java 1.8.


Download the JDK installer for Windows from the Oracle website.

Run the installer.

Add the bin directory of the installed JDK to the PATH environment variable, as described here.

To verify the JDK installation, open the Command Prompt and type `java -version`. If you run into any problem, go to the official Oracle documentation.

Installing Scala


To run Scala from the command-line, simply download the binaries and unpack the archive.

Start the Scala interpreter (aka the “REPL”) by launching scala from where it was unarchived. Start the Scala compiler by launching scalac from where it was unarchived.

Path and Environment
For quick access, add scala and scalac to your path. For example:


Installing sbt (optional)

Follow the instructions for your platform to get it running.

This course requires sbt version 0.13.x. If you have previously installed sbt 0.12.x, you need to uninstall it and install a newer version. sbt 0.13.x can be used for projects and other courses requiring sbt 0.12.x, but not the other way around. If in doubt, you can check your currently installed sbt like this: in an arbitrary directory that is not a programming assignment or otherwise an sbt project, run:

$ sbt about

You should see something like this:

This is sbt 0.13.11

If the sbt command is not found, or if you get a non-0.13.x version, you need to install sbt 0.13.x.

No Comments

Give a comment

Inquire Now
close slider