I am trying to connect R from java using RCaller and here is my code
RCaller caller = new RCaller();
RCode code = new RCode();
caller.cleanRCode();
caller.setRscriptExecutable("C:/Program Files/R/R-3.0.2/bin/Rscript.exe");
code.addRCode ("source(\"D:/Data Mining workspaces/Workspace/CQpackage/First_try.R\")");
code.addRCode("myinput()");
caller.setRCode(code);
caller.runAndReturnResult("Done");
First_try.R contains a function defnition and the function is called myinput()
When i run this i am getting this error, i am not able to understand the reason. Please HElp
rcaller.exception.RCallerExecutionException: Can not run C:/Program Files/R/R-3.0.2/bin/Rscript.exe. Reason: java.io.IOException: Cannot run program "C:/Program": CreateProcess error=2, The system cannot find the file specified
at rcaller.RCaller.runAndReturnResult(RCaller.java:393)