Skip to content

필사 모드: Setting Up a Scala Development Environment on Mac

English
0%
정확도 0%
💡 왼쪽 원문을 읽으면서 오른쪽에 따라 써보세요. Tab 키로 힌트를 받을 수 있습니다.
원문 렌더가 준비되기 전까지 텍스트 가이드로 표시합니다.

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...

작성 글자: 0원문 글자: 1,042작성 단락: 0/21