在Windows 7上的命令行工具中键入activator ui会给出以下错误消息。
C:\Program Files\activator-dist-1.3.6>activator ui
Found previous process id: 4164
Local repository: activator-launcher-local @ file:////C:/Program%20Files/activat
or-dist-1.3.6/repository
Play server process ID is 4068
java.io.FileNotFoundException: C:\Program Files\activator-dist-1.3.6\RUNNING_PID
(Access is denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at play.core.server.NettyServer$$anonfun$createServer$1.apply(NettyServe
r.scala:242)
at play.core.server.NettyServer$$anonfun$createServer$1.apply(NettyServe
r.scala:230)
at scala.Option.map(Option.scala:146)
at play.core.server.NettyServer$.createServer(NettyServer.scala:230)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:
289)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:
284)
at scala.Option.map(Option.scala:146)
at play.core.server.NettyServer$.main(NettyServer.scala:284)
at activator.UIMain$$anonfun$run$1.apply$mcV$sp(UIMain.scala:106)
at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:106)
at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:106)
at activator.UIMain.withContextClassloader(UIMain.scala:217)
at activator.UIMain.run(UIMain.scala:106)
at activator.UIMain.run(UIMain.scala:86)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.FileNotFoundException: C:\Program Files\acti
vator-dist-1.3.6\RUNNING_PID (Access is denied)
谷歌搜索过我已经看到过类似的例外情况,我没有找到一篇文章处理IM遇到的问题。
编辑:我发现如果我安装了最小的激活器构建并运行以下命令:activator -Dhttp.port=9999 ui
。激活器在浏览器中启动,但在尝试运行完整安装版本时,我收到上面发布的错误。
答案 0 :(得分:1)
我99%肯定你的问题是因为路径中的空间。尝试将activator-dist放在没有空格的地方。
这里提到: https://www.playframework.com/documentation/3.0.x/Installing
在Windows上,将; C:\ path \ to \ activator添加到PATH环境变量中。不要使用带空格的路径。
答案 1 :(得分:1)
激活器无法创建文件RUNNING_PID
。使用activator ui
命令以管理员用户身份运行该命令。