Is there a complete List of JVM exit codes

最后都变了- 提交于 2019-12-17 19:39:50

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/17671234/is-there-a-complete-list-of-jvm-exit-codes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!