Java 退出代码和含义
是否有 java 进程终止的退出代码和含义列表? 因为我有一个退出代码 23,但我不知道它是什么(我无法更改日志以查看完整的堆栈跟踪,因为它位于不同的远程服务器中)。
我浏览了几个小时,没有找到任何有关退出代码 23 的内容。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在 Java 应用程序中,当您调用
System.exit(n);
时,Java 运行时环境将返回n
作为退出代码返回给操作系统。该数字的含义取决于您正在运行的程序,而不是 Java 本身,而是您正在运行的程序生成该数字。没有标准数字。查看生成此退出代码的程序的文档以了解其含义。
In your Java application, when you call
System.exit(n);
, then the Java runtime environment will returnn
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.
退出代码 23 的含义没有定义。除了非零状态代码指示异常终止之外,退出代码对于值所代表的内容没有任何约定。零表示成功,但即便如此,它也完全取决于开发人员是否遵守此“标准”。
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'.
在另一个问题中,有一个指向页面的链接JVM 退出代码解释。但退出代码 23 似乎很神秘。
In another question there's a link to a page with JVM exit code explanations. But exit code 23 seems to be mysterious.
退出代码 23 可能意味着“系统中打开的文件太多”。
在某些 Linux 安装上,您只需运行
perror 23
即可进行查找。如果该命令不可用,您可以通过一个简单的 C 程序获取它:Exit code 23 could mean "Too many open files in system"
On some Linux installs you can simply run
perror 23
to look that up. If that command isn't available you can get it via a simple C program:在 Eclipse RCP 中,退出代码 23 表示重新启动。但它只能在 IDE 下运行。
In Eclipse RCP exit code 23 means restart. But it works under IDE only.