I’ve been having some fun lately exploring a functional, object-orientented, JVM language called Scala. This post will show you how to install it on Mac OS X in three simple steps.
Scala requires the Java Runtime 1.6 or later to be installed. Scala 2.12 requires Java 1.8. You can view the most current requirements at scala-lang.org/download/.
- Download Homebrew and update:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $ brew update
- Download Scala:
$ brew install scala
- Download SBT (Scala’s build tool):
$ brew install sbt
If you cannot or do not want to use Homebrew, you can install Scala manually and install SBT manually.
Whichever approach you took, test it out by entering the
scala command into the terminal. It should start an interactive Scala prompt. Continue the fun at Scala’s Getting Started page!