Java applications (JAR)
We use YAJSW to create a service wrapper for the JAR application.
- Download YAJSW
- Java 1.5 or higher (to check call java -version)
- NOTE: to display system tray java 1.6 is required. For thread dump with locks java 1.6 is required.
How-to use (src):
- Unpack the zip file to a folder <yajsw> and dont remove or rename
- Start the application you would like to wrap and get the PID of it (NOTE: not the PID of the batch script)
- Generate service configuration
- Goto yajsw/bat
- execute genConfig.bat <PID>
- This generates the file yajsw/conf/wrapper.conf which is the configuration file for wrapping your application
- Stop your application
- Open conf/wrapper.conf with a text editor
- set the password for wrapper.app.password or comment out wrapper.app.account (#)
- Adapt the value of wrapper.ntservice.name
- Execute your wrapped application as console application by calling
- check that your application (for example tomcat) is running
- To Install the application as service call
- To start the service:
- To stop the service:
- To uninstall the service:
- You can use the same YAJSW folder for more than one service. Therefore you can use different config files for each application.
For more information see the YAJSW documentation.