Campbell Ritchie wrote:Welcome to the Ranch
You should always use code tags; I have added them for you and doesn't the code look better
I presume you are familar with the content of Michael Daconta&apos's article “When Runtime.exec() won't”; if you aren't, don't go anywhere near exec(). You are not starting threads to empty the Process' input and error Streams, for a start.
There is something wrong about your assigning isStarted before you start, and reassigning it again later. By the way is itSee §10.5.2.
Thanks for you response, but this issue am facing is as below.
Am tried in the below ways to run the .sh file
Step1: p = Runtime.getRuntime().exec("sh /upapps/ptc/app/tests/gwr/startGWR.sh");
Step2: p = Runtime.getRuntime().exec("sh ../startGWR.sh");
But am getting the Nullpointer exception and return value for exitVal=1, because it is not reading the sh file or am calling the .sh file in wrong way.
Please help.