When you have made a little bit, you need to run the little bit after the machine is started, so you want to turn the Java class into a service like Tomcat. So I found the Java Service Wrapper. Below is some places I want to use. To integrate the Java class into the 3 Method of Windows NT Services (using Java Server Wrapper) Integration Java Service Wrapper: 1 Launch your application using the WrappersImpleApp class, which is the simplest, also recommended for Java Service Wrapper Method. 2 Use the WrapperstartStopApp class. This method and the first difference are that you can use a class boot service, another class to stop the service. This is particularly like a service program like Tomcat. 3 This method provides It is more flexible than the first two ways. The flexible back is to write code. Specifically, it is to implement the WrapperListener interface. When the user's interface class is launched, it is registered to WrapperManager. This allows us to customize service reception. Commands and corresponding responses, such as launching and closing services, etc.
The form after registration to the service is as follows: "C: /Wrapper_WIN32_3.1.2/bin/wining.exe" -s "c: /wrapper_win32_3.1.2/bin /../ conf / wrapper.conf" read the source of Java Service Wrapper After the code, use C to do Windows service, you are interested, ready to write some Java Service Wrapper how to do. Originally please refer: http://wrapper.tanukisoftware.org/doc/English/integrate.htmljni Getting Started HelloWorld