Execute a script in a Linux machine from a Java application

Hi,

I am trying to execute a script in a Linux machine from a Java application on a Windows environment. My code is

commande="rsh 185.30.30.30 -l goku /newfolder/bench/bin/Agent start ";

try{

Process process = Runtime.getRuntime().exec(commande);

}

catch(Throwable t){}

It works fine but the script takes too much time to start (almost 3 minutes). My question is there exists anther way to execute the script, another command? I have already tried ssh but windows doesn抰 recognize it

If somebody has any idea please let me know...

Thanks

[599 byte] By [jatsa] at [2007-11-27 6:36:59]
# 1
Can you execute the script on its own, that is from your shell? If so, how long does it take to complete?
Jamwaa at 2007-7-12 18:05:11 > top of Java-index,Java Essentials,Java Programming...
# 2
The script starts and stops a process (Agent) so it doesn抰 take too much time to execute itself. It is when I execute the script from my java program that i must wait to watch my process running in my Linux server.
jatsa at 2007-7-12 18:05:11 > top of Java-index,Java Essentials,Java Programming...
# 3
Read http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Jamwaa at 2007-7-12 18:05:11 > top of Java-index,Java Essentials,Java Programming...