When I first developed the Java service for Windows using the apache daemon, I used a mode JVMthat I really liked. You specify your class and static \ stop (static) methods. But with Linux, Jsvc is not like the same option. I really would like to know why ?!
In any case, if I am going to use the Linux init system, I try to find a similar way to perform the same behavior that the application should launch in any case, but in order to stop it, I will have to call the method in the class.
My question is: after running jar, how can I use jvm libraries or something else, call a method in my application (which will try to stop my application gracefully ).
Another question is if the application is running and this application has static methods. If I use the command line javato run a method mainin one, if this is an application class, and a method mainthat staticwill call another static method in the class in which I would like to signal a completion signal, which will call in the same JVM?
source
share