Running java program as Windows service
Running programs as windows service is often a requirement in programming and when it comes to Java support there are only very few libraries available. Most of them use native APIs and mostly written in C and often needs a java executable stub for Windows. There are only very few that is quite simple to understand and can be used with less effort. Lets see some of the available APIs for Java Service which can be quite handy.
Java Service Wrapper is one such good API which I am quite familiar with. The Wrapper API comes in three different flavors Professional, Standard and Community. Community version is free to download and use. The good thing about Java Service Wrapper is, it supports both running as Windows Service or Unix Daemon process. Java Wrapper is completely written in C and is very popular among the programing community.
Java Service Launcher (JSL) is another simple open source project which will help you to run java programs as Windows NT service. Java Service Launcher works good with NT 4.0, Win2000, Win2003 or XP and still not yet tested with Windows Vista. JSL is a very simple framework and has got reasonable to documentation. I didn’t try this personally but looks good. Read JSL FAQ here.
Java Service is a ObjectWeb Consortium open source initiative which allows server-type Java programs to be run in the background as a Windows NT/2000/XP system service (aka Unix daemon process). Java Service comes under BSD License and GNU Lesser General Public License (LGPL). Java Service currently supports Windows NT and Windows 2000 and is compatible with C, C++ and Java.
Java Native Access (JNA) provides easy access to Windows DLLs without writing any native codes. This will give the developer complete access to Windows Service API without any stub making all Windows Events and callbacks as cake walk. It has been claimed that facility is available to running itself as Windows Service but personally I have not tried. You can get the sample source here.
Related posts:









Comment by searcH engine optimisation — May 1, 2009 @ 5:17 am
Comment by searcH engine optimisation — May 1, 2009 @ 5:17 am
sain-web.com
Comment by Traveller_Adventure — June 20, 2009 @ 8:15 am