I have a java program which need to be run as a service. How do I do that easily?
We can do this by passing the daemon-reload command to systemctl. We'll need to run the daemon-reload command each time we modify the unit file. Next, we notice the system reports our service running but disabled. Disabled services will not start automatically when the system boots.
Good explanations in this article -- including the pointer to the Java Service Wrapper
open-source component that makes it easy.
Write a service in C/C++ and load the JVM from that. Or you can use some tool that wraps your Java application to a service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With