0

I wrote a java application on Windows and I produced a JAR file. I want to run this JAR file as windows service without using any wrapper like YAJSW, TanukiSoftware, WinRun4J, Apache Commons Deamon.

When I wrote a java application and produced a JAR file from it, I need to register JAR file as service on Windows, for example, using sc.exe <JAR file path> or java -jar <JAR file path>.

I searched on internet very long time but everyone says that you need to use wrapper to run a JAR file as windows service, I don't want that. Because I don't want my java project has some dependencies. I want my java project is dependency free as possible as.

How can I do that? Could you help me about this?

  • Why don't you want to use Winrun4j? Just one dependency is fine.Refer this also :https://stackoverflow.com/questions/15114674/run-jar-as-a-windows-service – Gaurav Feb 15 '18 at 08:19
  • Because, I don't want to dependent to any other program to run java application as windows service. Because I want to develop native java windows service application. –  Feb 15 '18 at 08:44

0 Answers0