Jetty 8 as a service using java service wrapper.on windows

扶醉桌前 提交于 2019-12-05 14:31:48

what is the value of wrapper.app.parameter.1 in your conf file?

I'd suggest the following configuration:

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp    
wrapper.java.classpath.1=%JETTY_HOME%/lib/wrapper.jar
wrapper.java.classpath.2=%JETTY_HOME%/start.jar
wrapper.java.library.path.1=%JETTY_HOME%/lib    
wrapper.java.additional.1=-Djetty.home=%JETTY_HOME%
#not necessary on windows 
#wrapper.java.additional.2=-Djava.io.tmpdir=/tmp    
wrapper.app.parameter.1=org.eclipse.jetty.start.Main

Hope this helps you out.

Edit: in my jetty home dir, the wrapper binary is in the bin folder and libwrapper.so (wrapper.dll) and wrapper.jar in the lib directory. So I don't have WRAPPER_HOME set...

Starting Jetty also works with the WrapperStartStopApp integration method. This is my wrapper.conf for my jetty/solr Server:

set.WRAPPER_HOME=D:/solr/solr_server4.1/service
set.JAVA_HOME=D:/Program Files/Java/jdk1.6.0_29
set.TMP=C:/TEMP

wrapper.working.dir=%WRAPPER_HOME%/..
wrapper.java.command=%JAVA_HOME%/bin/java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp

wrapper.java.classpath.1=%WRAPPER_HOME%/lib/wrapper.jar
wrapper.java.classpath.2=%WRAPPER_HOME%/../start.jar
wrapper.java.library.path.1=%WRAPPER_HOME%/lib

wrapper.java.additional.1=-Xmx1g
#wrapper.java.additional.2=-Djava.io.tmpdir=%TMP%

# StartStopApp START
wrapper.app.parameter.1=org.eclipse.jetty.start.Main
wrapper.app.parameter.2=0

# StartStopApp STOP
wrapper.app.parameter.3=org.eclipse.jetty.start.Main
wrapper.app.parameter.4=TRUE
wrapper.app.parameter.5=1
wrapper.app.parameter.6=--stop

With a start.ini containing for example

STOP.PORT=8990
STOP.KEY=mysecretkey
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!