title: How to close application when System.exit(0) does not works?
body: <p>I have a application. On Close button click I am calling  <strong>System.exit(0)</strong>. But on a machine it is not getting close that application. It is happening on few systems not all.</p>
  
  <p>I read some docs and forums and found that the <strong>exit() with 0</strong> (zero) int value is used for <strong>normal exit</strong>. and normally this method never returns normally (means close the application). BUT if  a <strong>security manager exists</strong> and its checkExit method doesn't allow exit with the specified status. </p>
  
  <p>My application is not creating any Security Manager and I know also that By default an application does not have a security manager. That is, the Java runtime system does not automatically create a security manager for every Java application. So by default an application allows all operations that are subject to security restrictions.</p>
  
  <p>I am also not sure that it is happening due to security manager.</p>
  
  <p><strong>Now I want to know two things.</strong></p>
  
  <ol>
  <li><p>Can I close the application successfully with the existence of system manager,  How ?</p></li>
  <li><p>Does <strong>System.setSecurityManager(null)</strong>; is the right way to do this ?</p></li>
  </ol>
  
  <p>I have to close my application by any way. Any suggesstion ?</p>
  
  <p>Thanks</p>
  
  <p>Tej Kiran</p>