<p>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 <a href="http://wrapper.tanukisoftware.org/" rel="noreferrer">Java Service Wrapper</a>, the <a href="http://commons.apache.org/daemon/jsvc.html" rel="noreferrer">Apache Commons project 'jsvc'</a>, and the <a href="http://commons.apache.org/daemon/procrun.html" rel="noreferrer">Apache Commons project 'procrun'</a>.  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.</p>

[{'answer_id': 25539, 'author': 'Dana the Sane', 'author_id': 2567, 'author_profile': 'https://Stackoverflow.com/users/2567', 'pm_score': 1, 'selected': False, 'text': '<p>Are there any special attributes that you need to apply (like OS guided resource management) that you need to support? Otherwise, for Unix you should be able to daemonize your application by writing an appropriate init.d script and setting your app to start automatically.</p>\n'}, {'answer_id': 25543, 'author': 'jsight', 'author_id': 1432, 'author_profile': 'https://Stackoverflow.com/users/1432', 'pm_score': 5, 'selected': True, 'text': '<p>I\'ve had great success with Java Service Wrapper myself.  I haven\'t looked at the others, but the major strengths of ServiceWrapper are:</p>\n\n<ul>\n<li>Great x-platform support - I\'ve used it on Windows and Linux, and found it easy on both</li>\n<li>Solid Documentation - The docs are clear and to the point, with great examples</li>\n<li>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".</li>\n<li>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.</li>\n</ul>\n\n<p>Anyway, just my 2 cents... :)</p>\n'}, {'answer_id': 847143, 'author': 'Peter Smith', 'author_id': 103715, 'author_profile': 'https://Stackoverflow.com/users/103715', 'pm_score': 2, 'selected': False, 'text': '<p>Another option is <a href="http://winrun4j.sourceforge.net/" rel="nofollow noreferrer" title="WinRun4J">WinRun4J</a>. This is windows only but has some useful features:</p>\n\n<ul>\n<li>32 bit and 64 bit support</li>\n<li>API to access the event log and registry</li>\n<li>Can register service to be dependent on other services (i.e serviceA and serviceB must startup before serviceC)</li>\n</ul>\n\n<p>Its also open source friendly (CPL) so no restrictions on use.</p>\n\n<p>(full disclosure: I work on this project).</p>\n'}]
['https://Stackoverflow.com/questions/25530', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/828/']