1. Download The wrapper-windows-x86-32-3.5.17.zip package that has been uploaded to my resources:
Http://download.csdn.net/detail/polokang/5040495
2. Export the program into a jar package
2. Make sure that % java_home % has been configured for the system variable, and put the jar package of the program to be started under the./lib file.
1. Copy the app. bat. In, InstallApp-NT.bat.in and UninstallApp-NT.bat.in files under/src/bin under the warpper package to./bin, and rename them, remove ". In ".
2. Copy wrapper.exe under/src/binin the warpper package to./bin.
3. Copy wrapper. jar and wrapper. dll under the warpper package to./lib.
After configuration, the path is as follows:
CAC --
--Bin--app.bat,installapp-nt.bat,uninstallapp-nt.bat,wrapper.exe
-- Conf -- wrapper. conf
-- Lib -- wrapper. dll, wrapper. jar, CAC. Jar
-- Logs -- wrapper. Log
3. Configure the wrapper. conf file in the conf folder.
1. Specify the Java path
Wrapper. java. Command = % java_home %/bin/Java
2. Specify the wrapper Startup Mode and use the wrapper agent to start
Wrapper. java. mainclass = org. tanukisoftware. wrapper. wrappersimpleapp
3. Specify the jar package and class file required by the service, which can be directly configuredWrapper. java. classpath.2 = ../lib/*. Jar
Wrapper. java. classpath.1 = ../lib/wrapper. Jar
Wrapper. java. classpath.2 = ../lib/CAC. Jar # (CAC. jar is the program that needs to be packaged for me with the main method)
4. Specify the main class, Com. xdnz. Cac. cacrequest is the class of the main method.
Wrapper. App. parameter.1 = com. xdnz. Cac. cacrequest
6. Specify the service name, display name, and service description.
Wrapper. Name = test wrapper CAC
Wrapper. displayname = test wrapper CAC
Wrapper. Description = test wrapper CAC