Scala

This page shows how to start with Scala using Eclipse

First you need to have Eclipse installed on your computer, for information about Eclipse and how to install it see this page.

From within Eclipse menu goto:

help -> software updates -> available software

eclipse install plugins

Click on 'Add Site'

Into Location enter:

http://www.scala-lang.org/scala-eclipse-plugin

and click on 'OK'

scala install

select 'Scala Eclipse Plugin' and click on install

scala install 2

Click next and accept terms.

New Scala Project

To start a scala project choose New project from menu

scala new project

click on next and enter project name:

scala new project 2

Click on Finish, that will give us a project node and under that a 'src' node in the package explorer, in the window on the left.

Right click on the 'src' node and create a new Package.

add package

Give it a name and click on finish.

Right click on the package node (which I called hello1 in this example). create a new scala object, name it, and click on finish.

add object

We can then enter a simple scala program into this object.

run scala program

To run it choose Run -> runAs from the menu. Select 'Scala Application' (not 'Run on Server' as shown above).

The program runs: in this case a message appears in the console.

scala program output


metadata block
see also:
Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2022 Martin John Baker - All rights reserved - privacy policy.