按照上面的链接后,我分别创建了新的“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)