I am trying to start a program using "java -jar $filename" and have it fork itself and keep running in the background, like it is possible with other programming languages e.g. in python
Asked
Active
Viewed 72 times
0
-
["Is it possible?" as a question](https://softwareengineering.meta.stackexchange.com/q/7273/2463) – President James K. Polk Oct 14 '22 at 21:47
-
well fwiw i *am* trying to figure out if this is even possible – Dave Ankin Oct 14 '22 at 21:51
-
2For windows - https://stackoverflow.com/questions/68113/how-to-create-a-windows-service-from-java-app For Linux https://stackoverflow.com/questions/11203483/run-a-java-application-as-a-service-on-linux – Victor Gubin Oct 14 '22 at 21:51
-
looks like it still relies on jsvc? at least i am finding code samples that leverage jsvc + apache commons daemon – Dave Ankin Oct 14 '22 at 22:07
-
which means that java is not the entrypoint, jsvc is. i think the answer to my question is no.... – Dave Ankin Oct 14 '22 at 22:09
1 Answers
0
The library which accomplishes this is org.kohsuke:akuma:1.10
on maven central

Dave Ankin
- 1,060
- 2
- 9
- 20