java background/daemon/service cross platform best

2019-01-31 07:41发布

I am looking for the best way to make my desktop java program run in the background (daemon/service?) across most platforms (Windows, Mac OS, Linux [Ubuntu in particular]).

By "best way" I am hoping to find a way that will:

  1. require a minimum amount of platform-specific code.
  2. not require the user to do anything a general computer user couldn't/wouldn't do
  3. not be a resource hog.

I understand that my requirements may be unrealistic but I am hoping there is some sort of "best practice" for this type of situation.

How to go forward?

7条回答
啃猪蹄的小仙女
2楼-- · 2019-01-31 08:48

If you dont need free solution, you can use Advanced Installer (www.advancedinstaller.com), it can make win-service as well as MacOS installer from your JAR, and more..

查看更多
登录 后发表回答