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

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Visual Basic .NET for Microsoft Platforms only.

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

cover Dark Basic Professional Edition - It is better to get this professional edition

cover This is a version of basic designed for building games, for example to rotate a cube you might do the following:
make object cube 1,100
for x=1 to 360
rotate object 1,x,x,0
next x

cover Game Programming with Darkbasic - book for above software

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

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