Getting Started

Requirements

  • the Java Development Kit, version 1.5.0 or newer. We recommend the latest 1.6.x version, there have been issues reported when using Eclipse and Java 7.
  • Eclipse, including the JDT. Either the "Classic" or "Eclipse for Java Developers" is sufficient. Scala IDE can be installed on both Eclipse 3.6 (Helios) and Eclipse 3.7 (Indigo). There is one known issue specific to using Scala IDE on Indigo, releated to tests discovery (#1000782).

Screencast

The getting started screencast provides a more visual explanation on the installation and the first steps with Scala IDE.

Installation

Scala IDE for Eclipse is best installed (and updated) directly from within Eclipse.

This is done by using Help Install New Software..., add the Add... button in the dialog.

Choose a name for the update site (Scala IDE is an obvious choice). Then read the next section to select which version you will install.

Choosing what version to install

The list of URLs of the different update sites are available in the download area. The release ones are in the current section. Scala IDE is linked to specific version of Scala, so you have to decide which one you are going to use:

  • release-29 provides support for projects using Scala 2.9.x (2.9.0-1 or 2.9.1). This is the current version of Scala. Pick this one if you are unsure.
  • release-28 provides support for projects using Scala 2.8.x (2.8.1 or 2.8.2).

If you want to live on the bleeding edge (like using Scala 2.10.x or Scala IDE master), check the description of each update site to find the one that fits your needs.

The version of Scala used inside Scala IDE cannot be chosen per project. So if you want to work with a project using different version of Scala (like 2.8.2 and 2.9.1), you need different installation of Scala IDE.

Finishing installation

Copy the URL as location and hit OK to validate.

Select Scala IDE for Eclipse from the list of available features.

Go through the next screens to validate the list of plug-ins to install, the License and start the installation.

After having restarted Eclipse, Scala IDE is installed.

For a more fine-tuned setup, check the Advanced Setup page.

Using Scala IDE with an existing project

You have successfully installed the Scala plug-in, and you can now import your favorite project.

Important

Before you begin, make sure your Scala sources follow the Java convention for packages. Each package should appear in its own directory with the same name. Eclipse expects this convention to be followed when it looks for classes.

Start from an existing SBT project

sbt is the standard build tool for Scala projects. There are two versions in wide use today: 0.7.x and 0.10+. Both have plug-ins that can generate Eclipse project files out of the sbt project definition.

  • If you are using sbt 0.7.x, use eclipsify. Follow this instructions to install the plug-in. You may want to check out the update-sources plug-in, which can download attached sources for your dependencies. This allows you to navigate through the libraries source in the IDE.
  • If you are using sbt 0.12.x, use sbteclipse. Follow the instructions on the project page to install and use the plug-in to generate the project definition. sbteclipse can download attached sources natively, so you do not need the update-sources plug-in.

Once you have installed and generated the Eclipse project files using one of the above plug-ins, start Eclipse. Use File Import General/Existing Project into Workspace. Select the directory containing your project as root directory, select the project and hit Finish. And Voila.

Important

sbt manages the dependency to scala-library.jar. Make sure the version of Scala you use in your sbt project matches the version of Scala installed in Eclipse.

Start from an existing maven project

maven support on the Eclipse platform is provided by the m2eclipse plug-in. Because of some specificities of Scala, m2eclipse-scala has been created as an extension to m2eclipse to provide better Scala support.

To install the latest version of m2eclipse-scala, use the update site at this location: http://alchim31.free.fr/m2e-scala/update-site/.

After installation, maven projects can be imported using File Import Maven Existing Maven Projects.

Troubleshooting

Check the Known Issues section.