【发布时间】:2013-10-03 22:11:38
【问题描述】:
项目你好
... // 此主题的类似线程中记录的代码
object Driver {
def main(args: Array[String]) {
val system = ActorSystem("Main")
val ac = system.actorOf(Props[HelloActor])
}
}
在配置中,主类定义为main。这是在之前关于该主题的帖子中提出的。
编译时收到错误:Cannot locate main type "main" in project hello.
为什么编译器看不到主定义?我试过使用 Driver.main 和 hello.main 无济于事。
【问题讨论】:
-
您确定在编译期间看到此错误,而不是运行?
-
你没看错,是运行状态。对不起。