See java exit code in Unix See java exit code in Unix unix unix

See java exit code in Unix


That's perfectly normal. You can look at the exit code of a command in Unix using $? in bash.


The value returned by System.exit can be read by the operating system, and it's OS-specific how it's interpreted. In most UNIX-like systems, a program's exit code can be captured by other processes if they so choose, but nonzero return values don't cause the OS to print any error message. For example, the javac compiler will return a nonzero status code if the program fails to compile, but the OS won't print out any special error messages in this case. If you want to bring up some sort of error dialog, you will need to do so manually.

Hope this helps!


You have to examine $? after java exits to see the exit code. The shell does not print messages by default when a command returns a non-zero status.