How to use SBT plugin in Eclipse for Scala project

  • Post category:Scala
  • Reading time:3 mins read

Hello Friends, In this post we will learn How to use SBT plugin in Eclipse for Scala project in 4 simple steps.

STEPS

Install the SBT plugin for Eclipse

Select/create a workspace and create a new Scala project

On the Create a Scala project page, name the “HelloWorld” project and click Finish.

Create a new Scala Object

// Write the simple code as mentioned below

object HelloWorld {
  def main(args: Array[String]): Unit = {
    println("Hello, world!")
  }
}

Run HelloWorld.scala as a Scala Application

Right click on top of the class and select the option “Run As -> Scala Application”

You should be able to see the console output as shown below

Happy Learning 🙂