Best Method to run a Java Application as a *nix Daemon or Windows Service?

后端 未结 3 1770
盖世英雄少女心
盖世英雄少女心 2020-12-15 18:40

I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I\'ve looked in to the Java Service Wrapper, the Apache Commons project \'

3条回答
  •  无人及你
    2020-12-15 19:11

    I've had great success with Java Service Wrapper myself. I haven't looked at the others, but the major strengths of ServiceWrapper are:

    • Great x-platform support - I've used it on Windows and Linux, and found it easy on both
    • Solid Documentation - The docs are clear and to the point, with great examples
    • Deep per-platform support - There are some unique features in the window service management system that are supported perfectly by service wrapper (w/o restarting). And on Windows, you will even see your app name in the process list instead of just "java.exe".
    • Standards Compliant - Unlike many ad-hoc Java init scripts, the scripts for service wrapper tend to be compliant with LSB standards. This can end up being very important if you ever want high availability management from something like Linux Heartbeat/HA.

    Anyway, just my 2 cents... :)

提交回复
热议问题