Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

ポイント

  • SBTがあればとりあえずScalaのライブラリをダウンロードしたりコンソールで試したりする環境がつくれます
  • SBTはHomebrewのbrewとして登録されています

手順

既にHomebrewをインストールしているひと

$ brew update

SBTのインストール

SBT(Scala Build Tool)をHomebrewでインストールします。

$ brew install sbt

SBTの動作確認

$ mkdir scala-playground
$ cd scala-playground
$ sbt console
[info] Set current project to scala-repl-with-libs (in build file:/Users/yusuke.kuoka/sandbox/scala-repl-with-libs/)
[info] Updating {file:/Users/yusuke.kuoka/sandbox/scala-playground/}scala-playground...
[info] Resolving org.fusesource.jansi#jansi;1.4 ... ← SBTやプロジェクトが必要とするライブラリを自動的にダウンロードしている
[info] Done updating.
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala> println("Hello World!")
Hello World!
scala>
  • No labels