Getting started with Scala
A while ago, I started playing around with Scala. To make things as easy as possible for me to write Scala code, I wanted to found out which IDE had the best support. The easiest to install was the Eclipse Scala plugin. All you need to begin writing Scala code is a JDK, Eclipse and the plugin URL. IntelliJ has a good plugin too, the installation requires one extra step where you have to install the Scala system before downloading the plugin.
Eclipse Scala Plugin
- Install a JDK – assume you’ve already done this, otherwise google “JDK” and download the latest version from Oracle.
- Install Eclipse – go to http://www.eclipse.org/downloads/ and download the most appropriate version for you.
- Copy the plugin URL from http://www.scala-ide.org/ by clicking on the button that looks like the one below
- Open Eclipse, go to Help > Install New Software… and paste the URL into the address field (the one that says Work with:)
- Download the plugin and restart Eclipse.
- IMPORTANT: Now, start a Scala project. Once the project is set up, go to Scala > Run Setup Diagnostics… and make sure to check the field “Use Scala-compatible JDT content assist proposals”
If you don’t do step 6, you will not get any suggestions when writing code, so make sure that you have completed step 6 before deciding not to continue with Eclipse.
IntelliJ Scala Plugin
- Make sure you have a JDK as in step 1 above for Eclipse.
- Install IntelliJ – the community edition is available for free and allows you to write Scala code. Go to http://www.jetbrains.com/idea/download
- Download the Scala IzPack Installer from http://www.scala-lang.org/downloads and run the package.
- Start intelliJ and click on Open Plugin Manager (top of right column that has the title “Plugins”)
- Click on the “Available” tab and look for Scala. Right click on the plugin and choose to install it.