play 框架 bat windows java 进程 [英] play framework bat windows java process
问题描述
我无法在 Windows 上将独立播放应用程序作为 Java 进程启动.我使用play dist"命令来生成一个 zip 文件,其中包含应用程序运行所需的所有 jar.zip 文件还包含启动"文件,其中包含应该启动应用程序的脚本(在 Linux 服务器上运行良好).
I am having troubles launching a standalone play application as a Java process on Windows. I use the "play dist" command in order to generate a zip file containing all the jars that are necessary for the application to run. The zip file also contains the "start" file that contains a script that is supposed to launch the application (works fine on Linux server).
我通过play dist-unzip"命令找到了 sbtgoodies 插件https://github.com/typesafehub/play-plugins/tree/master/sbtgoodies.它工作正常,但我总是得到一个 unix 脚本开始".如何获得 Windows 脚本start.bat"?
I found the sbtgoodies plugin with the "play dist-unzip" command https://github.com/typesafehub/play-plugins/tree/master/sbtgoodies. It works fine but I always get a unix script "start". How can I get a windows script "start.bat"?
推荐答案
带有以下命令行的 start.bat 应该可以工作:
The start.bat with the following command line should work :
java %1 -cp "./lib/*;" play.core.server.NettyServer .
注意;"在 lib/* 之后防止 Windows 预处理器扩展通配符
Note the ";" after lib/* to prevent Windows preprocessor from expanding the wildcard
这篇关于play 框架 bat windows java 进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!