Java program as a Windows service

11 02 2008

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.

Advertisements

Actions

Information

One response

14 04 2008
dragz

thanks for the info..
i have a small application needed to put on windows service.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: