玩框架蝙蝠的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"命令 https:找到了sbtgoodies插件: //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
这篇关于玩框架蝙蝠的Windows Java进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!