Linux Installation Guide
This document will guide you through setup on Linux so you'll be ready to do the course exercises, and optionally, continue exploring Scala after you're done.
Part 1: prerequisites for course exercises
Install Java JDK
- Use the
java -versioncommand from a shell prompt to see if java is installed. If you don't have version 1.8 or higher of the JDK installed on your system, use your package manager to install it or follow the directions at the OpenJDK install page.
- To verify the JDK installation, open the Command Prompt and type
$ java -version openjdk version "1.8.0_102" OpenJDK Runtime Environment (build 1.8.0_102-b14) OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
The package installation should have updated your
PATH environment to add the
bin/ directory of the installed JDK, but if the above command didn't work you will need to update the
PATH variable manually, as described here.
If you have problems installing the JDK, ask for help.
Download the ZIP file here. Unzip the project, and from the command line (navigate inside the directory) make sure you can do the following (this will take a little while the first time you do it).
$ ./sbt.sh Getting org.scala-sbt sbt 0.13.11 ... . . . (you'll see some [info] logs here) . . > console . . . (you'll see some [info] logs here) . . scala> Example.image.draw
An image of three circles should appear!
Part 2: optional Scala and SBT install for further learning
- Use your package manager OR go to the Scala Download page and choose the first option to download the Scala binaries installation package to your computer. Then follow the instructions here.
- Verify installation by opening a command prompt window and entering
scalaat the prompt:
$ scala Welcome to Scala 2.12.1 (OpenJDK 64-Bit Server VM, Java 1.8.0_102). Type in expressions for evaluation. Or try :help. scala>
scala> prompt indicates you are in the Scala REPL. For now, just type
:quit at the prompt to exit the REPL.
To install sbt, simply follow the instructions here