To package the Java jar as a service, wrapper is a good tool, and much of the information on the web is too complex to write.
A small problem yesterday led me to spend two hours to get it done. Keep a record here. In fact, just a few steps on the basic can be.
1. Download the version i downloaded is wrapper-windows-x86-32-3.5.17
The address I downloaded is http://jaist.dl.sourceforge.net/sourceforge/wrapper/wrapper-windows-x86-32-3.5.17.zip.
2, extract to any directory, the src/conf directory under the wrapper.conf.in renamed into wrapper.conf into the Conf directory.
3. Modify the wrapper.conf file to find
Wrapper.java.classpath.1 the location, add the service package below, the name is wrapper.java.classpath.2= .... And so on
Wrapper.app.parameter.1 's position, write the class name of Main.
4, run the test, installation Services, under the bin directory
"Test Run is normal
Wrapper.exe-c. /conf/wrapper.conf
"Installation Services
Wrapper.exe-i. /conf/wrapper.conf
"Uninstall Service
Wrapper.exe-r. /conf/wrapper.conf
"Start
Wrapper.exe-t. /conf/wrapper.conf
"Stop
Wrapper.exe-p. /conf/wrapper.conf
This completes all the configuration, if there is an error to the log directory to view the logs.