Scala environment to build and install Intellij IDEA

Original link: http://www.cnblogs.com/Wonderful-Life/p/9876804.html

1.JDK official website address: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Scala is based on java, java class libraries and extensive use of variables, and therefore must be installed before using Scala Java

  1. Installation JDK, select the installation path

 

 

  • Check whether the installation was successful

Open cmd, enter Java -version, the Java version number appears, the installation is successful

 

 

2.Scala official website address: https://www.scala-lang.org/download/all.html

Download the version according to IDEA corresponding versions can be installed by default, until, after also can check whether the installation was successful in cmd, and Java checks similar to input Scala -version, or enter Scala

 

 

3.Intellij IDEA official website address: https://www.jetbrains.com/idea/download/#section=windows

Enterprise Edition requires registration code, the following community version, for example, the installation process

  • Select the installation path

 

  • Select System digits, and plug-ins

 

 

  •  The installation is complete

 

 

  •  Configuration IDEA

 

 

 

  •  On the IDEA, install the Scala plugin
  • In the lower right corner click Configure, select Plugins

 

 

 

  •  Scala plugins Address: https://plugins.jetbrains.com/plugin/1347-scala
  • The Scala insert into Intellij IDEA path ... \ JetBrains \ IntelliJ IDEA Community Edition 2018.2.5 \ plugins
  • 点击Install plugin from disk…,选择Scala插件,列表出现Scala插件,则添加成功,然后重启Intellij IDEA

 

 

  • 创建Scala项目

 

 

创建Scala项目成功,在src文件夹点击右键 --> New --> Scala Class

项目命名为Test,Kind –> Object

写一个简单的测试

object Test {

  def main(args: Array[String]): Unit = {

    println("Hello")

  }

}

在在src文件夹点击右键-->New -->Run “Test”,下边有打印结果Hello,则表明一个简单的Scala项目创建成功

 

转载于:https://www.cnblogs.com/Wonderful-Life/p/9876804.html

Guess you like

Origin blog.csdn.net/weixin_30294295/article/details/94787635