I am using the system command to call a Java application. When there is a error, I am exiting out of the application using System.exit(1). But inspite of that system command always returns 0. And also Winrunner doesn't waits until the completion of the Java application.
Is there any work around this, because I need to get the return value from the Java application to proceed or stop.
system() launches the specified command and then continues with the script. dos_system() launches the specified command in a new window and waits for it to complete before continuing with the script. Therefore it sounds like you might be better served by using the dos_system() function.
"Any sufficiently advanced bug is indistinguishable from a feature." -Bruce Brown