I have a fairly simple Java executable jar that runs the main method, checks the availability of some services, and returns (i.e. terminates) normally if the services are up.
The executable jar is run repeatedly as monitor, and upon failure, an alarm is raised in an external alarm and reporting system.
If the services are down, the code throws a RuntimeException and on the command line, the java command throws the exception.
Does this count as a POSIX fail (i.e. return code 1)? Or, do I need to catch the exceptions and explicitly return 1?
Thanks