1. JDK official website address: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Scala is based on Java and uses a large number of Java class libraries and variables. Therefore, you must install Java before using Scala.
- Install JDK and select the installation path
- Check whether the installation is successful
Open CMD and enter Java-version. If the Java version is displayed, the installation is successful.
2. Scala official website address: https://www.scala-lang.org/download/all.html
The downloaded version can be installed by default based on the version of idea. After installation, you can check whether the installation is successful on CMD. Similar to Java check, enter Scala-version, or enter Scala
3. intellij idea official website address: https://www.jetbrains.com/idea/download/#section=windows
The Enterprise Edition requires a registration code. The following uses the Community edition as an example to describe the installation process.
- Select the installation path
- Select the number of system digits and plug-ins
- Install Scala plug-in on idea
- Click Configure in the lower right corner and select plugins
- Scala plug-in address: https://plugins.jetbrains.com/plugin/1347-scala
- Put Scala plug-in intellij idea path... \ Jetbrains \ intellij idea community edition 2018.2.5 \ plugins
- Click Install plugin from disk ..., Select the scala plug-in. If the scala plug-in is displayed in the list, add it successfully and restart intellij idea.
Scala project created successfully. Right-click the SRC folder and choose --> New --> Scala class.
Project name: Test, kind-> Object
Write a simple test
Object test {
Def main (ARGs: array [String]): unit = {
Println ("hello ")
}
}
Right-click the SRC folder and choose --> New --> Run "test". If the output is hello, a simple Scala project is successfully created.
Scala environment setup and intellij idea Installation