On 10/30/07, jithesh <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
>   I am working with java in linux environment. I have to execute a shell
> script through my java class.
>
> I used runtime object to execute the script but its not executing.
> my code is
>
> Runtime runtime = Runtime.getRuntime();
>        String cmd= "/opt/gs.sh";
>                runtime.exec(cmd);


runtime.exec() returns a Process object. You should get hold of it and
monitor the output and error streams. Also check the return value of the
process to make sure it executes properly.

Mike

Please provide suggestion to overcome this problem.
>
> Regards
> Jithesh
> --
> View this message in context:
> http://www.nabble.com/shell-script-in-java-tf4718365s2369.html#a13488290
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to