Setting Up a Scala Development Environment
Use the Brew package manager to download [coursier](https://get-coursier.io/). (It is a dependency management tool for Scala.)
brew install coursier/formulas/coursier
Then run the following command to proceed with setup, which registers Scala in your PATH and downloads the default libraries.
cs setup
Download the desired Scala version.
cs install scala:2.12.15 scalac:2.12.15
Add the Scala installation path export to the bottom of ~/.zshrc, and after closing and reopening the terminal, you will be able to run the scala command from the terminal.
export PATH="$PATH:/Users/<username>/Library/Application Support/Coursier/bin"
Scala REPL Environment Test
Scala provides a `REPL(Read-Eval-Print-Loop)` environment.
$ scala
Welcome to Scala 2.12.15 (OpenJDK 64-Bit Server VM, Java 18.0.1.1).
Type in expressions for evaluation. Or try :help.
scala> val a = 1;
a: Int = 1
scala> print(a)
1
scala>
Quiz
Q1: What is the main topic covered in "Setting Up a Scala Development Environment on Mac"?
How to install Scala on Mac
How to install Scala on Mac
Consider the practical examples and patterns discussed throughout the post.
현재 단락 (1/21)
Use the Brew package manager to download [coursier](https://get-coursier.io/). (It is a dependency m...