Child pages
  • Getting Started with IntelliJ IDEA Scala Plugin
Skip to end of metadata
Go to start of metadata

In this guide:

Before You Begin


  • Scala SDK should be downloaded and installed on your computer.

Setting up the Environment




Creating a Project




Exploring Project Structure




Creating Source Code

Now everything is ready for the first HelloWorld application.






  • No labels


  1. Anonymous

    This does not work (IntelliJ 8.2.1 OS-X). There is no Ctrl+Shift+F10nor Cmd+Shift+F10 available at all. menu -> Run is disabled.

    1. Anonymous

      You must add a target in Run>Configure. This is apparently ignored in the tutorial.

    2. Anonymous

      Doesn't work on 8.1.3 correctly. I don't get code completion.

  2. Anonymous

    Small annoyance, but the format coder always inserts a line between every declaration:

    def a: Int
    def b: Int
    def c: Int


    def a: Int

    def b: Int

    def c: Int

    1. Hello.

      Yes, this is a good point. Line spacing should be available to adjust.

  3. Anonymous


    I'm trying out IDEA mainly due to the bad state of the scala 2.8 plug-in for eclipse. I read somewhere that IDEA can also already be used to develop for 2.8 (what is the currently instable trunk). If I follow the above instructions, I come to select from a Scala version that goes just up to 2.7.5. How can I develop a scala 2.8 plug-in in IDEA?

    Thanks, -sciss-

    1. Hi.

      Using instructions from here you can build Scala plugin for IntelliJ which is able to work with Scala 2.8.

      1. Anonymous

        hi ilya,

        thanks for the fast response. i had to do export ANT_OPTS="-Xmx512m" before i could run ant (maybe that's worth adding to your text). Then, unfortunately, the scalac task ends with 43 errors....; is there something out of sync?

        1. Anonymous

          oh wait... the page points to a version called "Maia", and i got "Diana", i guess there's the problem... hold on, i will retry...

          1. Yep, that's the right point. (smile)

        2. Hi.

          Judging by the log you've attached, you have wrong version of IDEA SDK. Are you sure that idea.home property in your case points to the actual installation directory of the last IntelliJ EAP (10558)?

  4. Anonymous

    Followed all the instructions but trying to compile the plugin for Maia 10597 and 2.8 is giving 2830 errors.

    1. Yes, thins is known problem caused by major changes in Scala compiler and related to packaging system. Take a scala compiler version from before 24th of July 2009.

  5. Anonymous

    Is it possible to run on object on mac os or not?
    I keep getting just a console window. If I want that I can go back to emacs.
    I keep hearing how much better this is than Eclipse but honestly not feeling it.
    Can some detail how to get the same result as ctrl-shift-F10 on mac please!?

    1. If you have no problems with compilation, this might be a bug in a type system of the plugin. If your object doesn't inherit the `Application' trait, but uses an explicit main method, put type `Unit' to it signature explicitly. Hope, it helps.

  6. Anonymous

    No compilation errors.
    I am just using a main.
    type Unit gave same result.

    Please assume I know nothing, because I don't.

    I have a valid HW.scala. what do I do in ide ver 8.1.3?
    code completion works, etc.
    I'm on shiny new mac running Darwin.
    How do I run my object?

    Someone mentioned you have to configure something?

    I see an option to run a scala script but nothinh to run an app/object?

    1. These symptoms look very similar, isn't this your case?

      1. Anonymous

        Yep that was it.
        Hadn't realized I installed that other Scala plugin as well.
        Thanks Ilya.

  7. Anonymous

    I have MAIA 10652. I downloaded the Scala plugin from the plugin page ( and installed it but I didn't have code completion or any Scala recognition by the IDE that I expected.

    It was a simple fix, I detailed the steps I took on my blog:

  8. Anonymous

    I had tried to run helloworld in "scala script" run configuration, that was successfully executed with no output. And in compiler output directory there are no files.
    object HelloWorld
    def main(args: Array[String]) {
    Please write instructions on run configuration.

    1. Anonymous

      No responses in 3 month and it doesn't work so far. This plugin is shit.

      1. Anonymous

        Yeah, not so much activity from here lately.
        Hope they are on vacations or something like that and will be back soon (smile)
        As for your problem, I have never seen such, maybe you forgot to check "Make" in run configuration details?
        Also the common pitfall is absence of scala compiler in project dependencies or mismatched version of compiler in facet configuration.

  9. Anonymous

    I'm using IntelliJ 9 and all this instructions don't work. I keep getting "class not acceptable".

    1. Anonymous

      I have the same problem. Bummer, looks like a cool plugin but if HelloWorld doesn't work on a Mac and it's tough to diagnose, then it will likely be a tough call to use this plugin on a much larger project.

    2. Anonymous

      I had a similar problem.

      The problem I found was that it is compiling Java 1.6 by default.

      You need to tell it the source or target is 1.5.

      Not sure which one is important or where I found the option. Works now though.

      Have fun.

      1. Anonymous

        Thanks, switching to 1.5 did the trick for me.

  10. Anonymous

    Got the same problem.

    Open "Module Settings", select the project and go to the "Dependencies" tab.
    Check the box before "scala-2.8.0.Beta1" (or the scala version you selected when you created the project)

  11. Anonymous

    There was more to the story :/
    I did a little fiddling to get it working and thought only the last step was enough to get it working, so:

    1: Download the latest Scala version (2.8.0.RC) and unpack it.
    2: Open "Module Settings" - select "Scala" facet
    3: Replace "Scala compiler library" and "Scala SDK library" with the downloaded versions.
    4: Compile (it will probably fail, but with a different error)
    5: Go back to the "Scala" facet and change back to the original library versions
    6: Check "scala-2.8.0.Beta1"
    7: Compile
    And now it will work.

    1. Anonymous

      Thanks a lot !

    2. Anonymous

      i think it's even easier than that.

      1. create a new scala project, and allow it to download the correct libs

      2. open "module settings" -- select scala facet

      3.  tick the box "use additional jars for compiler or SDK"

      works for me.  strange it doesn't work out of the box though.

  12. Anonymous


    I've just installed the scala plugin with IJ 9.02.

    "Exception in thread "main" java.lang.ClassNotFoundException: ScalaTest"


    Any hints?

  13. Is there a forum to discuss the Scala Plugin for Idea?

  14. Seriously please update this , for IDEA 12.x , there's now a Scala module and its not quite clear where to get the sdk, the dropdown doesn't automatically fine what I'm guessing would be the jdk, so this needs updated instructions