{redirect:https://www.jetbrains.com/idea/help/creating-and-running-your-scala-application.html|delay=0} |
This getting started guide is intended for those who want to start working with the Scala IntelliJ IDEA plugin. Hope it gives you a good kick to start exploring the plugin for yourself, and, of course, reading this space - you can find more useful information about other helpful plugin features, like Java/Scala cross-language interoperability which includes refactorings, coding assistance and much more.
In this guide:
Currently, IntelliJ IDEA Scala plugin is in beta stage and is being actively developed. Here is the list of what you will need to try it:
After you have downloaded, installed and configured all the prerequisites, follow this simple procedure to get the Scala plugin up and running.
There is an alternative way to install the Scala plugin.Download the Scala plugin from the Nightly Builds for Leda page and unzip the archive to the directory <user home>/.IntelliJIdea<xx>/config/plugins. After that, run IntelliJ IDEA. |
If everything is fine, you're ready to create the Scala project with IntelliJ IDEA.
To significantly speed-up project compilation you may configure the Fast Scala Compiler (FSC). |
Now, when the project is ready, it is advisable to explore its settings. To do that, on the main toolbar, click . In the Project Structure dialog, click Modules, and then select the Dependencies tab:
Next, pay attention to the Scala facet added to our module:
As you see, IntelliJ IDEA has automatically specified the Scala compiler library, and added it to the list of module dependencies. If you want to learn more about project configuration, refer to http://devnet.jetbrains.net/thread/290032.
Now everything is ready for the first HelloWorld application.
You can skip first step. Instead of HelloWorld you can type helloworld.HelloWorld then appropriate package will be created automatically. |
You can also turn your Scala object into a script. Just remove all declarations from the file, leave the executable statement only - println("Hello, World!"), and run the script as described above. |