Help us understand the problem. What is going on with this article?

MacOSにscala環境を構築します

More than 1 year has passed since last update.

sbtのインストール

MacOSでは、Scalaプログラムを手動でコンパイルすることは非常に稀で、sbtという標準的なビルドツールを用いていること多いです。ここでは、まずsbtをインストールします。
Homebrewを用いてsbtをインストルします。

brew install sbt
#インストール済の情報
==> Downloading https://github.com/sbt/sbt/releases/download/v1.2.8/sbt-1.2.8.tgz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/279553/ae845a00-0be0-11e9-99d2-03a5afa9f1c7?X-Amz-Algorithm=AWS4-HMAC-SHA2
######################################################################## 100.0%
==> Caveats
You can use $SBT_OPTS to pass additional JVM options to sbt.
Project specific options should be placed in .sbtopts in the root of your project.
Global settings should be placed in /usr/local/etc/sbtopts
==> Summary
🍺  /usr/local/Cellar/sbt/1.2.8: 521 files, 50MB, built in 58 seconds
  • sbtの場所: /usr/local/Cellar/sbt/1.2.8

REPLとsbt

これからしばらく、REPL(Read Eval Print Loop)機能と呼ばれる対話的な機能を用いてScalaプログラムを試して見ますが、それは常にsbt consoleコマンドを経由して行います。

#sbt consoleを起動
sbt console
scala> println("hello scala!") 
hello scala!

ここまでは、scalaのインストールが完了です。

scalaを終了したい場合は、以下のコマンドで

scala> :quit
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした