Java exit codes and meanings

吃可爱长大的小学妹 提交于 2019-11-30 17:21:24

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.

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.

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'.

Per Lindberg

In another question there's a link to a page with JVM exit code explanations. But exit code 23 seems to be mysterious.

I compiled some "standard" exist codes I use across my apps in a enum, the exit codes are based on freebsd sys exits + jvm signaled exits, see SysExits.java for more detail.

In Eclipse RCP exit code 23 means restart. But it works under IDE only.

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