CS 334: Running Scala

Unix Lab Computers

You can run Scala on any of our Linux lab computers using the scala and scalac commands.

The names of our Unix computers are listed on the department's web page here. You'll need to run the VPN to access that page (and our computers) from off campus.

Personal Computers

You can also install Scala on your own computer. Here are minimal installation instructions to do so.
They should be sufficient in the most common cases, but your mileage may vary. You will want to use Scala 2.12 if at all possible.

We'll be using Scala for several weeks, so I'd suggest adding whatever Scala extension is available for your editor to support formatting and syntax coloring. I can help with that if run into trouble.

Mac

On the command line run the following:

brew update
brew install scala@2.12

You may need to add the location of scala to your path. In your terminal window, enter the following command:

export PATH=${PATH}:/usr/local/bin/

You'll need to do this each time you open a new terminal window. If you've used .bashrc files before, you can also add that command there, so that it runs each time you create a new bash shell.

Windows 10

There is a Windows installer available here: https://downloads.lightbend.com/scala/2.13.3/scala-2.13.3.msi. You may need to set up your path and environment if you use this installer: https://www.scala-lang.org/download/install.html.

Linux

On the command line run the following:

wget https://downloads.lightbend.com/scala/2.12.8/scala-2.12.8.deb
sudo dpkg -i ./scala-2.12.8.deb

Online

You can run the Scala interpreter on the web as well. Here is one site that works pretty well: https://repl.it/languages/scala. That site also lets you include data files in your projects, which will be useful since you'll need to read files in the upcoming assignments.