Step by Step of Building Scala SBT project on Intellij

HI guys,

Let’s talk about the 1st topic here about how to build a simple sbt project in intellij. Actually, I am a hardware engineer, so I will use newbie level terms and feel free to skip these if you are already a senior guy.

Although I have to admit that Maven (a java built tool) and Gradle are quite powerful build tool, the Apache recommend using sbt to build project. Thus, let’s build sbt project, which we can program some Scala code for the Apache spark project based on.

Platform versions


Java: jdk.1.8.0_45


Intellij: community 14.1.4


1. Install the Java idk

and set the Java_home like the following image shows up.


Type cmd in your menu->search window and type

java -version 

It should show up the java version.


2. Install the intellij

Intellij is a powerfull developing IDE, which is similar to Eclipse which most of you may heard of. However, Intellij has better support for Scala and Android development. So we choose Intellij here.

Please download and install it here,,

you might want the free community version, which is enough for us.

3. Build Hello world sbt project

After you installed the intellij, when you first opening it. The latest version 14.1.4 will let you choose to install scala plugin . Go select it. Open intellij and let’s build a simple sbt project without spark to testify your installation is correct.

4. Choose a sbt project


5. Name the project


6. Add the source code under src/main/scala/


7. Type in our first Scala App


8. Run the code


9. Let’s see the result


10. Sometimes we may encounter version issues, java missing class issues, among which might be resolved by cleaning Intellij cache. But remember to save files before cleaning cache


Congratulations, we have finished our first Scala App in Intellij!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s