Skip to end of metadata
Go to start of metadata
See also the tutorial Getting Started with Play 2.0 to learn how to create web applications with Scala.

Getting Started with Scala in IntelliJ IDEA

Before you perform the tutorial's steps we recommend you to watch the video with a quick overview of Scala support in IntelliJ IDEA.

1. Install plugin

Before you create your first Scala application make sure Scala plugin is installed and enabled via SettingsPlugins.

2. Create Scala project with project wizard

Open Project Wizard and select Scala template. Specify home directory for Scala. If you don't have it, you can get it via Download button.

It will be easier next time to create applications if you select to make global libraries.

3. Check project libraries

Open Project Structure and check the project libraries. Here you can configure additional libraries, e.g. ScalaTest or any others.

Check compiler settings

In Scala Facet settings you can check Compiler options.

4. Create object

The easiest way to create Scala file, worksheet or script is to use Ctrl + N shortcut from Project View or Navigation Bar.

Choose between class, object and trait with Up and Down arrows.

5. Run application

The fastest way to run the code at cursor is to use Ctrl + Shift + F10 shortcut.

Alternatively you can use the context menu.

See also the tutorial Getting Started with Play 2.0 to learn how to create web applications with Scala.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 22, 2014

    Anonymous

    Unfortunately Check RegExp floating menu position that should appear after the combination of Alt+Enter is hit (with the cursor on the regexp) does not work for me (IntelliJ Idea 13.1.3 Ultimate on Ubuntu 13.10) in Scala sources (it does work if I edit Java files though).

    1. Jun 24, 2014

      Anonymous

      Correct! It doesn't work for me either (Intellij Idea 13 Ultimate on OSX 10.9) when editing scala source. Please fix it!

  2. Dec 18, 2014

    Anonymous

    The article is quite out-of-date, could you rewrite it?

Add Comment