1. Download and install IntelliJ idea and install the Scala plugin
- I downloaded the 13 version of Linux, the Linux version is the green version, there is a startup script, run on it, you can also build a shortcut on Linux. Download the version of Windows, click Next, and the next step is to install it.
- Next install the Scala plugin, open idea, search at the Welcome interface point,
Configure->;Plugin->Browse repositories...
scala
then click install plugin
Install, restart
2. Building Scala with SBT project
Or in the Welcome Interface point Create New Project
Project interface Select the scala sbt
next page, fill out the project name and directory, JDK select Java JDK, specific installation see Linux in the Custom installation of Oracle Sun JDK method
After you have set up project, right-click New directory in the project home directory such as:
Then create a Hello.scala file, such as:
Then, enter print Hello world.
Scala
123 |
object Hello extends App { println("Hello World") } |
Continue, on the Hello.scala, right click on the Make Module "Projetname", long wait, idea automatically go to maven repo download dependent jar Package
After the idea has downloaded the relevant jar package, you can right-click on the Hello.scala to select Run, or debug the Scala program.
Debug Scala Program mode compilation method or call idea's Make method, need to modify the way to SBT compile way
Tagsintellij Idea-sbt-scala
IntelliJ Idea Development Scala