Vikash Ananda wrote:
System.exit(value) does not return the value to OS (batch file or shellscript) but it returns to JVM which JVM uses to see if the program was terminated correctly or not. Read Java specifications for the same. Why do you want this value??
Actually, this "value" does eventually get back to the OS (batch file and shellscript). With the batch file, it gets back as the error level, which can be used by the batch to act accordingly. With shellscripts, this value becomes the exit status of the application. And how the shellscripts accesses it depends on the shell being used.
Henry