jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes Creating a windows service application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Creating a windows service application" Watch "Creating a windows service application" New topic

Creating a windows service application

Sanath sajjan

Joined: May 29, 2012
Posts: 10
Hi guys,

I am trying to create an windows application, and then i have to run it as a windows service. I googled it, using winrun4j we can achieve it. But the documentation is very less to understand to create.

Thanks in advance

Martin Vajsar

Joined: Aug 22, 2010
Posts: 3733

I had a brief look at the winrun4j documentation and wouldn't say it is inadequately documented. You need to create a class implementing the Service interface, and create an ini file that will contain the name of this class in the service.class key (among other things). There is a small example of a simple service (ini file plus the source code).

What do you know about Windows Services themselves (ie. before getting Java into the picture)? I believe that if you read some info on Windows Services, the rest should be much more obvious to you.

You should also know that processes running as Windows services operate in a distinct environment, with some specific rules governing access rights (among others). If your application needs to access resources on the network (such as a shared folder), you may need to study a lot to get it working.
I agree. Here's the link: http://aspose.com/file-tools
subject: Creating a windows service application
jQuery in Action, 3rd edition