What is the best way to run a java application as a Service on Windows (32 or 64 bit)?

12

What you need to do to run a Java application (without visual interface) as a Windows service. The program basically uses the Filesystem API and the network API (java.net, java.io and java.nio)

If you need to build from the sources I'd like to use GNU C ++ instead of Visual Studio.

Any tips?

    
asked by anonymous 21.02.2014 / 20:59

2 answers

10

According to a similar question in stackoverflow.com You can use Apache Commons Deamon tools to accomplish this.

Specifically there is Procrun which is a set of applications that allows you to package Java applications as services running in the background in Windows.

I can imagine another possibility, in .Net creating a program as windows service is a 'trivial' task and there are some ways to integrate Java libraries for use with .Net, you can combine this and create a .Net service that uses your Java functions.

    
21.02.2014 / 21:21
1

Install4j creates installers for Java applications, which in turn can be installed as services in Windows. It is a paid product but allows you to manage various details of a service setup / configuration. This is the tip.

    
21.02.2014 / 21:29