Simple and flexible method to run java as a windows service

怎甘沉沦 提交于 2019-12-03 03:54:05

I have had similar issues over the years. Its not that they all are inferior, its that they are all pretty hard to integrate nicely with your own project.

You may want to check out stork: https://github.com/fizzed/stork

It'll help create launchers for your Java console or daemon apps, and they will work across all major platforms. There is also a maven plugin in case you wanted to tie it into your existing build process.

I'm not sure if JWrapper will fulfil all the requirements like 1 and 2 in the way that you want it since rather than you dictating how it does the launch and where it puts things etc JWrapper instead handles that stuff in its own way but it does produce executables for win/mac/linux and more importantly it does support windows service installation as well as macos and linux daemon installation:

http://www.jwrapper.com/guide-installing-a-service.html

The service support though is for paid licenses, the free version doesn't currently support it.

Disclosure: I work for JWrapper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!