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

Asked

Viewed 2,267 times

13

What you need to do to run a Java application (no 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 it is necessary to build from sources I would like to use GNU C++ instead of Visual Studio.

Any hint ?

2 answers

11


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

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

I can imagine another possibility, in . Net creating a program as a windows service is a 'trivial' task and there are some forms to integrate Java libraries to be used with . Net, you can combine this and create a service. Net that uses its functions developed in Java.

1

The Install4j creates installers for Java applications, which in turn can be installed as services on Windows. It is a paid product, but allows you to manage various details of an installation/service setup. Tip.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.