Install java program as a windows service: Alternative to JavaService?

31,650

Solution 1

I'm now using WinRun4J - a really nice, lean tool that is easy to configure and handle and usable in commercial applications. Many thanks to assylias, whose comment pointed my in the right direction.

Solution 2

Some time ago I used the tanuki project and we were very happy with it. I believe is one of the most popular ones.

There is also YAJSW that is based on tanuki (as I understand ) with a LGPL licence

Solution 3

I have used Tanuki's Java Service Wrapper with great success; it's easy to use.

There are community packages (free) and professional packages (license).

Solution 4

AlwaysUp is a commercial alternative that supports Windows 7 and XP. This step-by-step tutorial shows you how to setup a java application as a service.

Solution 5

I have recently used Java Service Wrapper from Tanukisoftware and it works perfectly on windows 7. Also the tool is pretty handy as it provides pretty extensive integration mechanism from simple jar execution to shutdown hook functionality as well.

For normal use, you can use their Community License which falls under GPL v2.0, however keep in mind if your intended use is on server, you might have to double check licensing options.

Also windows resource kit includes a tool called servany.exe which i successfully used on Windows Xp to start a jar file as a service by lanuching java.exe with arguments to my jar file, however since windows 7 this somehow does not work.

You might want to do a little research since i have read some forums about people still affirming that it works.

Share:
31,650
mort
Author by

mort

Updated on July 09, 2022

Comments

  • mort
    mort almost 2 years

    I'd like to install a Java application as a Windows service. I did so successfully a couple of years ago using this Java Service wrapper. Unfortunately, it seems like this tool is not in development anymore and thus no Windows 7 and 64 bit versions are available. I need to install my Java application on Windows 7 and XP machines.

    Does anyone know a good alternative?

    Edit: I need this for commercial use; the suggested Java Service Wrapper from Tanuki is too expensive.

  • Johnydep
    Johnydep about 12 years
    it might not be an ideal choice if you want to setup the whole process from within java itself, since AlwaysUP does not allow any command-line switches, or does it?
  • CoreTech
    CoreTech about 12 years
    The "regular" AlwaysUp is GUI based but there are command line tools for doing that sort of thing
  • bhdrkn
    bhdrkn almost 10 years
    YAJSW is easy to install and also you do not need to alter your code. YAJSW is also provides a system tray, a custom console and a service configurator for Windows.