Download windows version : Http://nchc.dl.sourceforge.net/sourceforge/wrapper/wrapper-windows-x86-32-3.2.3.zip
Now as long as 32 people have free, 64 free version is not yet done. The official online (community) column is free of charge.
1. First put your project into a jar package with MANIFEST.MF, such as Bb.jar. Create a new directory, for example: Dist, below the D-disk. Put the Bb.jar in the Dist directory.
2. Create a new Conf,lib,log three folder under the Dist directory. Conf is the place where the configuration files are stored, Lib is the place where the packages are released, and log is where the journal files are stored
3. Unzip the downloaded Wrapper-windows-x86-32-3.2.3.zip to the Java Service Wrapper package src/bin/ The app.bat.in,installapp-nt.bat.in,uninstallapp-nt.bat.in in the directory and the Wrapper.exe under the bin directory are placed under the Dist directory. remove the suffix. in. Description: " App.bat (You can run the program directly), Installapp-nt.bat (installed as a Windows service), Uninstallapp-nt.bat (uninstallingtheWindows service) ".
Modify the set _wrapper_conf= "%_realpath%conf\wrapper.conf" in the App.bat,installapp-nt.bat,uninstallapp-nt.bat three files.
or set _wrapper_conf= "D:\dist\conf\wrapper.conf".
4. Copy the Wrapper.dll,wrapper.jar from the Lib directory in the Java Service Wrapper package to Dist/lib
5. Place the wrapper.conf.in under the src/conf directory in the Java Service Wrapper package under project/conf and remove the suffix. In. Then modify the wrapper.conf file:
Wrapper.java.command=%java_home%/bin/java here refers to the Java.exe path used to execute your program.
Wrapper.java.mainclass=org.tanukisoftware.wrapper.wrappersimpleapp uses the first form of integration to encapsulate the program
Wrapper.java.classpath.1=e:/dist/lib/wrapper.jar here to add is used in the jar package file, from 1---n write it yourself, but wrapper is a must
Wrapper.java.classpath.2=e:/dist/aa.jar
Wrapper.java.library.path.1=e:/dist/lib This is to store the Wrapper.dll position .
Wrapper.app.parameter.1=org.wise.frame.mainframe This is your own executable program's main class
Wrapper.logfile=e:/dist/log/wrapper.log Specify where log files are stored
Wrapper.console.title=myapp Service
Wrapper.ntservice.name=myapp Services These 4 names are for service.
Wrapper.ntservice.displayname=myapp Service
Wrapper.ntservice.description=myapp Service
6. Then run App.bat directly, if the run is successful, then you can perform installapp-nt.bat to publish to Windows services, and then can be set to boot from the start, not afraid of others when the program is not executed.
This is normal boot app.bat (console)