Is there a list of exit codes and meanings for java process terminations? Because I have an exit code 23 and i don't know what it can be (I cannot change the log to see the full stack trace because it sits in a different remote server).
I browsed it for hours and couldn't find any mentioning of exit code 23.
This status code is an integer value and its meanings are as follows: exit(0) - Indicates successful termination. exit(1) - Indicates unsuccessful termination. exit(-1) - Indicates unsuccessful termination with Exception.
exit function has status code, which tells about the termination, such as: exit(0) : Indicates successful termination. exit(1) or exit(-1) or any non-zero value – indicates unsuccessful termination.
An exit code or exit status is a number that is returned by an executable to show whether it was successful. This is also sometimes called a return code, or in some cases, an error code, although the terminology here may be slightly different.
The main alternative is Runtime. getRuntime(). halt(0) , described as "Forcibly terminates the currently running Java virtual machine". This does not call shutdown hooks or exit finalizers, it just exits.
In your Java application, when you call System.exit(n);
, then the Java runtime environment will return n
as the exit code back to the operating system.
What the number means depends on the program you are running - not Java itself, but the program you are running produces this number. There are no standard numbers. Look in the documentation of the program that produces this exit code to find out what it means.
There is no definition for what exit code 23 means. Exit codes have no convention on what the values represent other than that a nonzero status code indicates abnormal termination. Zero indicates success but even then it is completely dependent as to whether the developer adheres to this 'standard'.
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