开发者

faces error in running the scala project [duplicate]

This question already has an answer here: Closed 10 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜