How can i run my java application as a window service?

156 Views Asked by At

I had made a simple java program of screen capture I want to run that program as a window service but I had trouble im not able to find the right way I had used WinRun4J but at the time of starting the service, I got an error that error 1053 the service didn't respond to start and control service. plz, help with a simple third party which is not complicated to start with im doing this first time?

1

There are 1 best solutions below

8
Guy Yafe On

You can wrap it with a batch file (.bat) and have that batch file as a service. Gradle eill do it out of the box for you using distribution plug-in.