当我通过以下方式运行 jetty 时:
set PROJECT_HOME=%CD%
start java -Dproject.home="%PROJECT_HOME%" -DSTOP.PORT=8079 -DSTOP.KEY=stop -jar start.jar etc/jetty-logging.xml etc/jetty.xml
我可以在mycontext.xml中使用参数PROJECT_HOME:
SystemProperty name="project.home" default=""
当我从Jetty-Services.exe运行jetty时,有什么方法可以将PROJECT_HOME传递到mycontext.xml
提前致谢。
最佳答案
假设您正在使用 Windows Service Wrapper。
我认为你可以在 jetty-service.conf 中配置它
wrapper.java.additional.1=-Djetty.home=../projectHome
关于java - 如何将参数传递给jetty服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4645522/