This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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().