一、官網下載安裝scala-*.msi 。java
二、配置環境變量,同配置java環境變量方式同樣。git
scala解釋器,即REPL,也能夠叫作scala shell。github
C:\Users\Administrator>scala
Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131).
Type in expressions to have them evaluated.
Type :help for more information.shell
scala>express
用快捷鍵:win + R ,直接在窗口輸入scala。intellij-idea
C:\Users\Administrator>sbt console
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from C:\Users\Administrator\.sbt\1.0\plugins
[info] Loading project definition from C:\Users\Administrator\project
[info] Set current project to administrator (in build file:/C:/Users/Administrator/)
[info] Updating ...
[info] Done updating.
[info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.4. Compiling...
[info] Compilation completed in 8.976s.
[info] Starting scala interpreter...
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131).
Type in expressions for evaluation. Or try :help.maven
scala>ide
經過離線安裝方式,避免在線安裝網速慢的問題。個人idea版本:IntelliJ IDEA 2017.3.5 (Ultimate Edition)ui
1. 下載IEDA的scala插件,地址http://plugins.jetbrains.com/?idea_ce
2. 安裝Scala插件:Configure -> Plugins -> Install plugin from disk -> 選擇Scala插件 -> OK -> 重啓IDEA lua
File– new project – scala項目 – IDEA類型
詳情的安裝過程能夠參考這篇博客。也能夠新建一個普通的maven工程,而後直接複製這個github項目模板的pom.xm的相關內容到本地就行。
一、IntelliJ IDEA 中建立 Maven Scala 項目 https://unmi.cc/intellij-idea-create-maven-scala-project/
二、scala Maven項目模板:https://github.com/datadevsh/scala-program-template(主要看pom.xml文件)
若是已經按照博客的內容進行了設置,那麼新建步驟以下。
一、選擇maven工程,選擇配置好的scala maven工程模板
二、設置maven配置
三、項目名稱
四、右下角選擇容許
一、文件夾上右鍵新建
二、快捷鍵新建Scala 文件: Ctrl + Alt + Insert
一、scala class :普通的scala文件
二、scala Worksheet : 能夠寫scala腳本。可寫相似在scala shell裏面寫的格式。這個文件在idea裏面,能夠相似scala shell同樣,實時編譯。
三、scala script:
Scala程序設計 一步一步認識Scala 【Scala 1】
https://blog.csdn.net/datadev_sh/article/details/79596070