I am looking for a complete list of all possible jvm exit codes (not java System.exit(x)). The only thing I could find by using a search engine is a list of SIGTERM exit codes: http://journal.thobe.org/2013/02/jvms-and-kill-signals.html . I want to know if there are specific exit codes for uncatched Exceptions?
Asked
Active
Viewed 2.3k times
1 Answers
19
Argument passed to System.exit(x) -> becomes the JVM exit code.
Exit code 0 is used to indicate normal exit. Unique positive exit code to indicate specific problem.
I want to know if there are specific exit codes for uncatched Exceptions?
No. If all non-daemon threads exit normally(presence/absence of exception does not matter), JVM terminates with 0.
Exit code between 1 and 127 are specific codes used to indicate error in JVM. e.g. mismatched jdk/jre versions, incorrect memory configuration/command-line options, etc.
About the link
http://journal.thobe.org/2013/02/jvms-and-kill-signals.html
JVM exit due to specific signal would be
128+signal-id
List of signal-id can be found using kill -l

Amit G
- 2,293
- 3
- 24
- 44
-
1a link to such list ("Exit code between 1 and 127 are specific codes used to indicate error in JVM") would be really helpful. – istepaniuk Dec 17 '21 at 10:34