title: Alternative to System.exit(1) in Java to pass veracode scan
body: <p>J2EE Bad Practices: Use of System.exit()</p>
  
  <p>VeraCode scan is showing the above security flaw. Vera Code is pointing to the places where System.exit used other than main() method. </p>
  
  <p>Purpose of the System.exit(1) is to exit the system if the connection is invalid while executing the batch jobs.</p>
  
  <p>What is the alternative to System.exit(1) in order to pass the Vera Code scan.</p>