Setup of a scala project using IntelliJ IDEA
I suppose you have already downloaded and installed the community edition of IntelliJ IDEA from this link, that you have your java, scala, spark, etc…environment ready and working.
You can launch IntelliJ, and once you opened it, you can simply do:
create new project, specifying that it will be a Scala project under SBT:
Then, you will be asked the directory name to create the new project, the project name, the java and scala version, etc…
You have to flag the auto import option:
IDEA will take a while to prepare your project, but in few minutes you will have this structure:
At this point, you have 2 important things to do:
- prepare your build.sbt in order to include the library you are going to use
- go under src->main->scala and create you first scala file, for example Test1.scala
You are ready!
You can now compile and the run you project