开发者

faces error in running the scala project [duplicate]

开发者 https://www.devze.com 2023-01-29 15:34 出处:网络
This question already has an answer here: Closed 10 years ago. Possible Duplicate: run configuration for scala in eclipse
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

精彩评论

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

关注公众号