java.lang.NoSuchMethodError: main when starting HelloWorld with Eclipse Scala plugin
Posted
by Matt Sheppard
on Stack Overflow
See other posts from Stack Overflow
or by Matt Sheppard
Published on 2009-07-16T06:23:31Z
Indexed on
2010/03/25
22:43 UTC
Read the original article
Hit count: 563
I've just been playing with Scala, and installed the Eclipse plugin as described at http://www.scala-lang.org/node/94, but after entering the "Hello World" test example and setting up the run configuration as described, I get the following error
Exception in thread "main" java.lang.NoSuchMethodError: main
For reference the code is
package hello
object HelloWorld extends Application {
println("Hello World!")
}
I've tinkered a bit with the obvious solutions (adding a main method, adding a singleton object with a main method) but I'm clearly doing something wrong.
Can anyone get their test example to work, or point out what I am doing wrong?
© Stack Overflow or respective owner