[R] Starting Rserve in Java using Runtime Failed

Shing Hing Man matmsh at yahoo.com
Mon Jul 10 20:45:32 CEST 2006


I have tried using the following piece of Java code to

start Rserve on my Linux PC without success.


try {
String command = "R CMD Rserve ";
Process p = Runtime.getRuntime().exec(command);
returnCode = p.waitFor();
if (returnCode != 0) {
errorMessage = "Unexpected return code = " +
returnCode;
}

} catch (Exception e) {			
errorMessage = "Exception in running :" + e;
}


I did not get any non-zero return code or error
message. 
It works when I run 'R CMD Rserve' at the command
line.


My version of R is 2.2.1 and  I am using Rserve
v0.4-3.

Thanks in advance for any assistance!

Shing 

Home page :
  http://uk.geocities.com/matmsh/index.html



More information about the R-help mailing list