When I close a java program in intellJ, the following log appears in the console: "Process finished with exit code 130"
Some times, the code is "1".
I know this is the very basic, but I googled Internet and still couldn't find the explanation for the exit code.
What does the code mean? Where can I find the explanation?
The following example shows a job that exited with exit code 130, which means that the job was terminated by the owner.
exit() method terminates the currently running Java Virtual Machine. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
exit(0) method terminates JVM which results in termination of the currently running program too. Status is the single parameter that the method takes. If the status is 0, it indicates the termination is successful.
Java System exit() Method The exit() method of System class terminates the current Java virtual machine running on system.
To steal @Baby 's answer from the comments and formalize it, this states that the 130 exit code is given by bash, and indicates that the process was terminated by a SIGTERM. Generally this is the user pressing Ctrl-C.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With