Java exit codes and meanings

Assaf picture Assaf · Jun 23, 2011 · Viewed 53.5k times · Source

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.

Answer

Jesper picture Jesper · Jun 23, 2011

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.