...
Code Block |
---|
$ mkdir scala-playground $ cd scala-playground/ $ touch build.sbt $ sbt console |
sbt consoleを実行したあと、必要なライブラリが自動的にダウンロードされて、最終的に「scala>」というプロンプトが表示されればOKです。
Code Block |
---|
[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> |
Hello World!
sbt consoleを使って、「Hello World!」という文字列を出力してみましょう。
...