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.
java -version command 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 -versionopenjdk 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.shGetting 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!
Verify installation by opening a command prompt window and entering
scala at the prompt:
$ scalaWelcome 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