Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java program exit with code "130"

When I close a java program in intellJ, the following log appears in the console: "Process finished with exit code 130"

screenshot of java program exit code

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?

like image 505
Nicolas S.Xu Avatar asked Apr 27 '15 04:04

Nicolas S.Xu


People also ask

What is process finished with exit code 130?

The following example shows a job that exited with exit code 130, which means that the job was terminated by the owner.

What is Java exit code?

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.

What does exit 0 do in Java?

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.

What does system Exit 1 do in Java?

Java System exit() Method The exit() method of System class terminates the current Java virtual machine running on system.


1 Answers

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.

like image 107
Sinkingpoint Avatar answered Sep 21 '22 03:09

Sinkingpoint