是否有完整的 JVM 退出代码列表 [英] Is there a complete List of JVM exit codes
问题描述
我正在寻找所有可能的 jvm 退出代码(不是 java System.exit(x))的完整列表.通过使用搜索引擎,我唯一能找到的是 SIGTERM 退出代码列表:http://journal.thobe.org/2013/02/jvms-and-kill-signals.html .我想知道未捕获的异常是否有特定的退出代码?
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?
推荐答案
传递给 System.exit(x) 的参数 -> 成为 JVM 退出代码.
Argument passed to System.exit(x) -> becomes the JVM exit code.
退出代码0用于表示正常退出.唯一的肯定退出代码,用于指示特定问题.
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?
没有.如果所有非守护线程正常退出(有/无异常无关紧要),JVM以0终止.
No. If all non-daemon threads exit normally(presence/absence of exception does not matter), JVM terminates with 0.
1 到 127 之间的退出代码是用于指示 JVM 中的错误的特定代码.例如jdk/jre 版本不匹配、内存配置/命令行选项不正确等
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.
关于链接
http://journal.thobe.org/2013/02/jvms-and-kill-signals.html
JVM 因特定信号而退出将是
JVM exit due to specific signal would be
128+信号标识
可以使用kill -l
这篇关于是否有完整的 JVM 退出代码列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!