LoginSignup
0
0

More than 5 years have passed since last update.

Scala 学習前の環境構築 [Windows×IntelliJ×Scala]

Last updated at Posted at 2018-10-22

概要

ドットインストールでScalaを勉強する前のWindowsでの環境構築の手順を記載

前提条件

JDKの設定済みであること (JAVA_HOMEの設定済み)
IntelliJがインストール済みであること(Community版でOK)

手順

1. IntelliJを開き、Scalaのプラグインをインストールする

  • Configure -> Pluginsを選択

I1.png

  • PluginsでScalaを検索して Install を実行。再起動を求められるので、再起動

I2.png

2. Scalaのプロジェクト作成

  • Create New Projectを選択。ScalaのSbtを選択

I3.png

  • Nameにプロジェクト名を入力しFinishを選択。JDKが入力されていないならダウンロードしたJDKのパスを指定する

I4.png

3. Scalaのクラスファイル作成

  • プロジェクト作成後、src -> main の中にあるフォルダを右クリックして New -> ScalaClassを選択。

I5.png

  • KindをObjectを選択して適当な名前を入力

I6.png

4. 作成したオブジェクトにHelloWorldを記述

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

5. オブジェクトを右クリックして Run を選択。HelloWorldが表示されることを確認

I10.png

0
0
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
0
0