new-project

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:

new-project

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:

idea3

IDEA  will take a while to prepare your project, but in few minutes you will have this structure:

setup-project

At this point, you have 2 important things to do:

  1. prepare your build.sbt in order to include the library you are going to use

idea6

  1. go under src->main->scala and create you first scala file, for example  Test1.scala

idea5

You are ready!

You can now compile and the run you project

compile

Good sparking using scala on IDE!