将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)
遗漏了什么?
发布于 2016-03-24 15:44:49
没有在根项目上运行的主类,这就是异常的原因。要使用runAll启动所有的Lagom服务,请参阅the Lagom getting started documentation。
顺便说一句,当任务在根项目上执行时,我们使用a ticket使run成为runAll的别名。
发布于 2016-03-25 07:35:12
只需执行activator而不是activator run,然后按照上面和入门指南中的建议执行runAll。
https://stackoverflow.com/questions/36188740
复制相似问题