Scala setting on Intellij from install to build

Kwon Jinhwan
Jul 27, 2017 · 2 min read

There are many ways to build program, you can choose to build codes with maven which are quite famous and easy. If you are using IntelliJ (Comnunity version is good enought), you can build your program more easily

first you have to download intellij

If you use community edition, as it is an open source, it is free.

anyway after install the IntelliJ , you also have to download the scala plugin.

Go to IntelliJ IDEA/Preference(in Mac) which is in left top of the corner.

There, you can find “Plugins” , obviously click it.

Then also you can see “ Browse Repositories, also click it. then another pop-up window will be popped. there you can search “scala” → you should download language.

download this plugin! “SCALA”!!!!!

Now you can write your code easily.

Other options such as configuring folder hierachy, naming, blabla … are quite same as Java

So, if you want to create new class, object, or trait of scala , then do right click a folder.

Before you make scala source code file, you have to modify a folder as Source Root. Then you can generate scala class or object files.


Now, I think you are pretty much done making initial setup.

While you write your own code, you probably have to use third party pacakages or anything that is not in scala package.

Configuring dependency is quite easy compared to configuring in terminal via commandline.

Go to File/Project Structure. Go to Libraries , click + to add dependencies.

choose “from maven” then you will have a pop-up windows where you can search library files.

After you find what you want, click OK, click project folder which you want to use that library, press OK

Do as much as you want.


After you finish with your codes , you probably going to make executable file (.jar)

There are few steps in order to build a jar file.

First we need to select which module(with dependency) you are going to build with .

Go to File/Project Structure , go to Artifacts, click + .

Click Jar, module with dependencies…

choose the module that you configured with dependencies

choose your main class to execute, and click OK

After you have finished configuring artifacts settings.

On the top menu bar, you can find Build/Build Artifacts -> build

Your .jar file will be located at “out/artifacts/<module name>

We are done! Congrat.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade