LoginSignup
16
15

More than 5 years have passed since last update.

macのEclipse(Luna)でScalaの環境を作ってみた。

Last updated at Posted at 2014-08-12

Java6の環境がいらないなら、

http://blog.irgaly.net/2014/03/23/uninstall-apple-java6/
を参考に削除。

JDKのダウンロード

http://www.oracle.com/technetwork/java/javase/downloads/index.html
jdk-8u11-macosx-x64.dmg 217,918,294バイト

Eclipseのダウンロード

http://www.eclipse.org/downloads/
eclipse-jee-luna-R-macosx-cocoa-x86_64.tar
を解凍してアプリケーションフォルダーに移動

Scalaのダウンロード

http://www.scala-lang.org/download/
scala-2.11.2.tarを解凍して適当なフォルダーに移動

環境変数を設定(.bash_profile)

export SCALA_HOME=/path/to/scala
export PATH=$PATH:$SCALA_HOME/bin

EclipseにScala IDE for Eclipseをインストール

Help→Install New Software...
addで
http://download.scala-ide.org/nightly-scala-ide-luna-211x
を追加

出てきたものすべてをインストール

Eclipseを再起動

もしかしたら、EclipseのJREとかの設定が必要かも。

HelloWorld

Scalaプロジェクトを作成して
srcにScalaObjectでファイル作成

Main.scala
object Main {
  def main(args: Array[String]) = {
    println("Hello World")
  }
}

コンソールに出力されればOK。

16
15
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
16
15