Click here to Skip to main content
15,867,308 members
Articles / All Topics

Getting the Tools to Create a Scala Project

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
13 Oct 2015CPOL2 min read 10.1K  
One possible way of getting all you need to start experimenting with Scala

This post is going to be a pretty small one that talks you through one possible way of getting all you need to start experimenting with Scala.

There are obviously other ways, but this is the toolset I personally have found to be quite useful.

So what are the bits and bobs you need to get working with Scala. Well, there are really only 2 things you absolutely must have. These are:

Java

You MUST have a version of Java installed. I would recommend the latest version which you can grab from this site:

Obviously, grab the one that suits your requirements.

Scala

You will also need Scala. I would recommend you use the latest version of that too. You can grab that from this site:

That is actually strictly all you need to create a Scala program, but we have all probably come from places where we use an Integrated Development Environment (IDE), so let’s grab one of those too.

SBT

However, just before we grab the IDE, let’s make our lives easier and grab a copy of SBT (a nice build tool). You can grab this from this page:

We will make use of SBT in future posts, but for now we just want to make sure we have downloaded a copy of it.

IntelliJ

There are numerous IDEs out there, I happen to like IntelliJ as it comes with a nice free community edition and is a fairly nice IDE (I still think it's way behind Visual Studio though).

You can grab IntelliJ from here:

With all that in place, you should now be able to create a new project in IntelliJ which should target Scala + SBT.

Something like this:

image

image

image

On this screen, I would recommend that you tick the box “Use Auto Import”, which allows SBT to auto import packages you have requested.

After you have finished this wizard, SBT will do a bit of work, this will take a little while even for a brand new project. Let it do its magic (you will need internet connection), and then you should be left with a project structure something like this:

image

You would then place code in the Scala folder that matches the version you chose to target. For example, for this project, I chose to use Scala 2.11, so that is what folder I would add my new Scala code files to in the IntelliJ project.

Anyway, that is all I wanted to say for now. We will continue our journey in subsequent posts.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)

- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence

Both of these at Sussex University UK.

Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2016
  • Codeproject MVP 2016
  • Microsoft C# MVP 2015
  • Codeproject MVP 2015
  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog

Comments and Discussions

 
-- There are no messages in this forum --