And how are You going to run shell script without starting a new process?
You can write scripts in Groovy, then you can run without creating a new process
antonette.Gislas answered on October 8th 19 at 00:57
In unix, start a new shell script (if the shell script) takes a fraction of a second (more tell the time command), which is comparable small in comparison with the frequency of launch. Nothing wrong with creating a new process.
But if it is a java program, its time initialisatie can be significant. Such a program is better not to restart often.
But if you want to touch the basics of the Jedi arts: make a daemon that will run, do the share work and cover for a minute, and your Java code in a minute to kick it message to the socket, and to revive and restart when it freezes/crashes.
colton answered on October 8th 19 at 00:59
In addition to the above. Ie everything is correct, run the script without launching the shell, is obviously impossible)
Hmm, so raise one process and pull it all the time, giving him the script. Or take the startup script out in the native environment in any way (a demon, as said above, or securerom or something like that).