且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将Java应用程序作为* nix守护程序或Windows服务运行的***方法?

更新时间:2022-04-07 03:53:18

我自己在Java Service Wrapper上取得了很大的成功。我没有看过其他人,但ServiceWrapper的主要优势是:

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


  • 很棒的x平台支持 - 我用过它在Windows和Linux上,发现两者都很简单

  • 可靠的文档 - 文档清晰明了,有很好的例子

  • Deep per -platform支持 - 窗口服务管理系统中有一些独特的功能,服务包装器(无重启)完全支持。在Windows上,您甚至可以在进程列表中看到您的应用程序名称,而不仅仅是java.exe。

  • 符合标准 - 与许多ad-hoc Java init脚本不同,脚本为服务包装器往往符合LSB标准。如果你想要Linux Heartbeat / HA之类的高可用性管理,这可能会变得非常重要。

  • 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.

无论如何,只是我的2美分...... :)

Anyway, just my 2 cents... :)