Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does 2.11.1 fail with error: not found: type Application?

Tags:

I'm trying to compile the following code:

object Main extends Application{
  println("Hello World");
}

But I'm getting this error:

/Users/xx/JavaProjects/ScalaApplication1/src/scalaapplication1/Main.scala:8: error: not found: type Application
object Main extends Application{
                    ^
one error found

I'm using Scala 2.11.1.

like image 450
Naughty.Coder Avatar asked Oct 03 '14 09:10

Naughty.Coder


Video Answer


1 Answers

Application has been deprecated from scala 2.9, probably it has been deleted in scala 2.11 (it still exists in scala 2.10) even though at the moment I can't find proofs for that, use App instead.

Proof found, this is the scala 2.11 branch on github which has only an App.scala and this is the 2.10 which has App.scala and Application.scala with a deprecated warning.

like image 62
Ende Neu Avatar answered Oct 25 '22 11:10

Ende Neu