eclipsescalascala-ide

Scala worksheet not evaluating the REPL and printing the result on right side


I am learning spark and using eclipse ScalaIDE, in which i am creating a new worksheet.

As the worksheet in scala is evaluated when we save the file and result are printed in the right side, but this is not happening when i make some changes in the worksheet.

Here is my scala worksheet:

object LearingScalaWorkshheet1 {
  println("Welcome to the Scala worksheet")

  val hello: String = "Hello World!"
  println(hello)
}

Is there anything which i am missing?


Solution

  • Changing the scala installation to default version solved the problem for me.

    Follow these steps:

    1. Right click on project -> Properties -> Scala Compiler
    2. Click the drop down against Scala Installation.
    3. Change the value in drop down to "Latest 2.12 bundle (dynamic)"

    enter image description here