J
janak
Hi,
I am trying to execute a System command located at remote machine.So i
use Rmi concept for this purpose.
The model source code is
try
{
Runtime r = Runtime.getRuntime();
Process p = r.exec("System command");
int e = p.waitFor();
System.out.println("The process value :" + e);
}
catch
{
....}
I got succeed in executing the file.here waitFor() method will return a
value 0 (if the process executed successfully) or 1 (if the process
execution fails)But the problem i faced is i cant able to get the
status of that execution whether it is running or get terminates. The
waitFor() method work successfully on the terminal(or command window in
windows)when i terminate the process by using ^C but when i tried this
in JSP i cant able to terminate the process. I tried to use the
exitValue() method but i cant. How to monitor the runtime process on
remote machine. I am using Linux and Netbeans IDE.
Can anyone give solution to this.....
S.Janakiraman
I am trying to execute a System command located at remote machine.So i
use Rmi concept for this purpose.
The model source code is
try
{
Runtime r = Runtime.getRuntime();
Process p = r.exec("System command");
int e = p.waitFor();
System.out.println("The process value :" + e);
}
catch
{
....}
I got succeed in executing the file.here waitFor() method will return a
value 0 (if the process executed successfully) or 1 (if the process
execution fails)But the problem i faced is i cant able to get the
status of that execution whether it is running or get terminates. The
waitFor() method work successfully on the terminal(or command window in
windows)when i terminate the process by using ^C but when i tried this
in JSP i cant able to terminate the process. I tried to use the
exitValue() method but i cant. How to monitor the runtime process on
remote machine. I am using Linux and Netbeans IDE.
Can anyone give solution to this.....
S.Janakiraman