3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Scala 2.11 で Hello World

Last updated at Posted at 2015-12-08

前提条件

  • OS : MacOS X
  • brewインストール済み

1. Scalaインストール

# brewのリポジトリ更新
$ brew update

# scalaインストール
$ brew install scala

# scalaのインストール確認
$ scala -version
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
$ calac -version
Scala compiler version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL

2. Hello World

適当なフォルダにScalaファイルを作成

Hello.scala
object Hello {
  def main(args: Array[String]) {
    println("Hello, Scala!")
  }
}

コンパイルして実行

# コンパイル
$ scalac Hello.scala

# 実行
$ scala Hello
Hello, Scala!

まとめ

一先ず、Scalaで Hello Worldができました。
次は、WebフレームワークのPlay Frameworkの動作環境を作ります。

Next > Scala で Play Frameworkプロジェクトを作成する

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?