是否有JVM退出代码的完整列表 [英] Is there a complete List of JVM exit codes

查看:142
本文介绍了是否有JVM退出代码的完整列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找所有可能的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 + signal-id

128+signal-id

可以使用kill -l

这篇关于是否有JVM退出代码的完整列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆