scala

Scala: How to Create Scala project in eclipse

Setup Scala project in eclipse with Hello World program

Scala is a programming language for general software applications. Scala has full support for functional programming and a very strong static type system. This allows programs written in Scala to be very concise and thus smaller in size than other general-purpose programming languages. One way for using Scala is via Eclipse an modern IDE

Eclipse

In computer programming, Eclipse is an integrated development environment (IDE). It contains a base work space and an extensible plug-in system for customizing the environment.
The following steps are common for both Windows and Linux

Steps

1.Download the eclipse for Scala from here both Windows and Linux are available.

2.You need Java (JDK) to open the eclipse so download JDK and set the environment path

3.Extract the eclipse file and run the eclipse installer and it will launch a window

4.Choose a working directory where your Scala projects will be stored

5.Create a new Scala project and see the project structure in your left hand side.

Scala_eclipse


6. Enter  some name for your project and choose the JRE version

Scala_eclipse


7.Create new Scala object to write a Scala Hello World program

scala_eclipse

 

 

 

 

 

 

 

 

 

 


8.Enter a name for the Scala object and click finish will launch an editor and type your Scala Hello World program

Scala_eclipse


9.Now give a try for Hello World in Scala

Scala_eclipse


10.Run the Scala application

Scala_eclipse


11.See the output in the console

Scala_eclipse

Why we need Java for Scala ?

Scala runs on Java Virtual Machine so Scala needs Java too run. And both generates byte code.