A few days ago, I used JSL for transforming a small Java program as a Windows service. The usage is really simple, define a class with static methods for starting and stopping the service. An example is the class TelnetEcho.java given with the sources of the library.
Then add the “jsl.jar” into the classpath, adapt the “jsl.ini” file to your needs and run “jsl.exe -debug” for testing the correct configuration of the service. This launches the service. Type “Ctrl-C” for stopping properly the service.
If everything is OK in this debug test, then you simply have to run “jsl.exe -install” in order to install the service. The name of the service is set in the jsl.ini file.
The service is then removed (if needed) with “jsl.exe -remove”.
Thanks Michael for this library.