安装的Activator为:
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)
缺少什么?
答案 0 :(得分:4)
在根项目上没有要运行的主类,这就是异常的原因。要使用runAll
启动所有Lagom服务,请参阅the Lagom getting started documentation。
顺便说一下,当在根项目上执行任务时,我们a ticket使run
成为runAll
的别名。
答案 1 :(得分:-1)
只需按activator
代替activator run
,然后按照上面的建议和入门指南进行runAll
。