Hi Guys, Does anyone explain how to execute a qshell.sh from Java program? I know Process process = Runtime.getRuntime().exec ....... I can use it. I wonder whether Java program can get a return value from qshell script. if so, how.
Runtime.exec() returns a Process object, which has a method exitValue() to get the exit value of the executed process. You'll have to call waitFor() on the Process object first to wait until it has finished before calling exitValue().