1

安装激活器为:

brew install typesafe-activator

创建了一个新项目:

activator new my-first-system lagom-java

切换到目录并运行项目,如下activator run所示:

[info] Set current project to my-first-system (in build file:/Users/arungupta/workspaces/my-first-system/) [info] Updating {file:/Users/arungupta/workspaces/my-first-system/}my-first-system... [info] Resolving jline#jline;2.12.1 ... [info] Done updating. java.lang.RuntimeException: No main class detected. at scala.sys.package$.error(package.scala:27) [trace] Stack trace suppressed: run last my-first-system/compile:run for the full output. [error] (my-first-system/compile:run) No main class detected. [error] Total time: 0 s, completed Mar 23, 2016 12:08:22 PM

这是JDK版本:

java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

少了什么东西?

4

2 回答 2

4

根项目上没有要运行的主类,这就是异常的原因。要启动您使用的所有 Lagom 服务runAll,请参阅Lagom 入门文档

顺便说一句,我们有一张票可以为在根项目上执行任务的时间设置run别名。runAll

于 2016-03-24T07:44:48.583 回答
-1

只需按照上面和入门指南中的建议执行activator而不是activator run执行。runAll

于 2016-03-24T23:35:11.817 回答