通过Commons Daemon Procrun让Java应用程序作为Windows服务运行
转自: 点击打开链接 Contents 1 Overview 2 Prerequisites 3 In a nutshell 4 Running the Sample Application 5 How does it work 5.1 Java Code 5.2 Installation Script 6 Questions/Comments 7 References/Further Reading Overview Apache Commons Daemon is made of 2 parts. One written in C that makes the interface to the operating system and the other in Java that provides the Daemon API. Both Win32 and UNIX like platforms are supported, but for this article I will only focus on the former and show you how to use Procrun to run your java application as a windows service. Prerequisites If you want to run the