在以下程序下分别编写R脚本时出错

时间:2013-06-22 08:48:26

标签: java r rcaller

Calling R in java-Rcaller

按照上面的链接后,我单独创建了新的“myScript.R”。 请告诉我它正在显示“保存工作区”以进行保存。我已将其保存为扩展名为.R的文件。如果我错了,请纠正我。

我在Netbeans IDE中创建用于将RCaller与Java连接的相同Java程序(在上面提供的链接中)运行时收到以下错误:

    run:
    java.io.IOException: Cannot run program "Rscript": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:448)
at java.lang.Runtime.exec(Runtime.java:345)
at javaapplicationrcaller2.JavaApplicationRCaller2.<init>(JavaApplicationRCaller2.java:41)
at javaapplicationrcaller2.JavaApplicationRCaller2.main(JavaApplicationRCaller2.java:25)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:288)
at java.lang.ProcessImpl.start(ProcessImpl.java:133)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 5 more
    BUILD SUCCESSFUL (total time: 0 seconds)

0 个答案:

没有答案