Possible Duplicate:
run configuration for scala in eclipse
please help me this time. I am running a scala projec开发者_开发百科t and got an error:
could not find main class in: main.scala.controls.MyServer.
I'm running main.scala and there is a object of name MyServer. Is it necessary to create a class for it. Please respond
I'm running main.scala and there is a object of name MyServer. Is it necessary to create a class for it.
No, you don't need to create a class. All you need is an object with a main
method:
def main(args: Array[String]): Unit = { println("hello") }
Anyway, provide more info: code, how you try to run it, building system, IDE, etc.
精彩评论