Reputation: 2633
I'm using Eclipse Scala plugin. I created a simple program:
object HelloWorld {
override def main(args: Array[String]) {
println("Hello World!")
}
}
I can run this program from the menu: Run As -> Scala Application
However, with this code
object HelloWorld extends Application {
println("Hello world!")
}
I get this error message: "Selection does not contain a main type"
Does anyboby know how to solve this?
Upvotes: 3
Views: 2098
Reputation: 3219
This is a known bug. In a version of scala plugin for eclipse that I use this bug is repeatable only for objects in default package.
By the way, the usage of Application trait is not recommended - see corresponding documentation for details.
Upvotes: 3