Java退出代码和含义 [英] Java exit codes and meanings

查看:388
本文介绍了Java退出代码和含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有退出代码列表和java进程终止的含义?
因为我有退出代码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).

我浏览了几个小时,找不到退出代码23。

I browsed it for hours and couldn't find any mentioning of exit code 23.

推荐答案

在Java应用程序中,当您调用 System.exit(n); 时,Java运行时环境将返回 n 作为退出代码返回操作系统。

In your Java application, when you call System.exit(n);, then the Java runtime environment will return n as the exit code back to the operating system.

这个数字的含义取决于你运行的程序 - 而不是Java本身,但是你运行的程序产生这个数字。没有标准数字。查看生成此退出代码的程序文档,了解其含义。

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.

这篇关于Java退出代码和含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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