I have a application. On Close button click I am calling System.exit(0). But on a machine it is not getting close that application. It is happening on few systems not all.
I read some docs and forums and found that the exit() with 0 (zero) int value is used for normal exit. and normally this method never returns normally (means close the application). BUT if a security manager exists and its checkExit method doesn't allow exit with the specified status.
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.
I am also not sure that it is happening due to security manager.
Now I want to know two things.
Can I close the application successfully with the existence of system manager, How ?
Does System.setSecurityManager(null); is the right way to do this ?
I have to close my application by any way. Any suggesstion ?
Thanks
Tej Kiran