我正在Windows 7中使用Dist命令准备部署。(播放2.0.4)

zip生成成功,但是当我尝试使用以下命令启动应用程序时:

java -Dhttp.port=9001 -cp "e:\deploy\test-1.0-SNAPSHOT\lib\*" play.core.server.NettyServer


控制台显示此错误:


  错误:找不到或加载主类
  e:\ deploy \ test-1.0-SNAPSHOT \ lib \ ch.qos.logback.logback-core-logback-core-1.0.0.jar


我已经检查过这个jar是由Play Framework在... c:\Play\play-2.0.4\repository\cache\ch.qos.logback\中生成的

如果执行启动或运行命令,则编译和执行成功。

使用stage命令,我收到其他错误:

[error] {file:/C:/test/}test/*:stage: java.io.IOException: Cannot run program "chmod": CreateProcess error=2, The system cannot find the file specified


我不确定,但是会和原来的问题有关。

最佳答案

;的魔力
在第一个命令中,我在;之后添加了*
this prevent Windows pre-processor from expanding the wildcard.

最后:

java -Dhttp.port=9001 -cp "e:\deploy\test-1.0-SNAPSHOT\lib\*;" play.core.server.NettyServer


我以前已经在其他Windows系统x64中部署了;并不是必需的。

09-16 04:59
查看更多