将Java应用程序作为* nix守护程序或Windows服务运行的最佳方法? [英] Best Method to run a Java Application as a *nix Daemon or Windows Service?

查看:131
本文介绍了将Java应用程序作为* nix守护程序或Windows服务运行的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找将Java应用程序作为* NIX守护程序或Windows服务运行的最佳方法。我查看了 Java Service Wrapper Apache Commons项目'jsvc',以及 Apache Commons项目'procrun'。到目前为止,Java Service Wrapper看起来是最好的选择...但是,我想知道是否还有其他开源友好许可产品。

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 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Service Wrapper looks like it's the best option... but, I'm wondering if there are any other "Open Source friendly" licensed products out there.

推荐答案

我自己在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... :)

这篇关于将Java应用程序作为* nix守护程序或Windows服务运行的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆