Hi

Peter Schneider-Manzell wrote:
Do you get error messages or exceptions?

2007/10/30, jithesh <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:


    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);

    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
    <http://Nabble.com>.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>

If you google "Runtime.Runtime" the first hit is a comprehensive Sun Tutorial on how to execute a process using Runtime.exec including how to use it to capture output (useful for debugging).

http://www.google.com.au/search?hl=en&q=Runtime.Runtime&btnG=Google+Search&meta=

HTH,

Rob Hills
Waikiki, Western Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to