Recently createdXiao DingdongAnd automatically run after the machine is started.Xiao DingdongSo I want to convert the Java class into a service to run it like tomcat.
So I foundJava service wrapper.
Here are some of the places I want to use.
Change the Java class to the third method of the Windows NT Service (using Java Serivce wrapper)
Three methods for Integrating JAVA service wrapper:
1. UseWrappersimpleappClass to start your applicationProgramThis is the simplest and recommended method for Java service wrapper.
2. UseWrapperstartstopappClass. This method is different from the first one in that one class can be used to start the service, and the other class can be used to stop the service. This is especially like a service program such as Tomcat.
3. This method provides a more flexible way to implement services than the first two methods.CodeTo complete. Specifically, it is the implementationWrapperlistenerInterface, when the user's interface class is registeredWrappermanager.In this way, we can customize the commands and corresponding responses received by the Service, such as starting and disabling the service.
The registration form is as follows:
"C:/wrapper_win32_3.1.2/bin/wrapper.exe"-s "C:/wrapper_win32_3.1.2/bin/../CONF/wrapper. conf"
Read the Java service wrapperSource codeLater, I am interested in using C for Windows Services. I want to write some
How is the Java service wrapper service program implemented.
For the original article, see:
Http://wrapper.tanukisoftware.org/doc/english/integrate.html
JNI getting started with helloworld