The value passed into System.exit should be zero if there was no problems encountered but I'd recommend you to let the main method run to its end as well if possible. System.exit kills the JVM.

//...