Hello,
I am trying to run JRI example from rJava, but I have some issues. I have read
many posts and didn't find any solution to my problem.
I have the following code:
Rengine re = new Rengine(null, false, null);
System.out.println("Rengine created, waiting for R");
if (!re.waitForR()) {
System.out.println("Cannot load R");
return;
}
System.out.println("re-routing stdout/err into R console");
But I get the message:
Creating Rengine........
Java Result: 10
When I run the program. It never reaches the statement below Rengine re = new
Rengine(null, false, null); I think there might be some problem while creating
Rengine.
Then I tried something like this: without any parameters in Rengine
Rengine re = new Rengine();
System.out.println("Rengine created, waiting for R");
if (!re.waitForR()) {
System.out.println("Cannot load R");
return;
}
System.out.println("re-routing stdout/err into R console");
Now it shows me the following message:
Creating Rengine........
Rengine created, waiting for R
re-routing stdout/err into R console
which means that Rengine was created. But if i try to add some lines like this
.....
double [] d = {1.0, 2.0, 3.0};
re.assign("a", d);
after the line above and try to run again it shows me following error messages:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6c731a9e, pid=5152, tid=492
#
# JRE version: 6.0_25-b06
# Java VM: Java HotSpot(TM) Client VM (20.0-b11 mixed mode windows-x86 )
# Problematic frame:
# C [R.dll+0x31a9e]
#
# An error report file with more information is saved as:
# C:\Documents and Settings\ajayami\My
Documents\NetBeansProjects\JAVA_R\hs_err_pid5152.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)
I don't know how to solve this problem. Does anyone have idea how to solve
this??
I have kept all the .dll files in System32 folder.
Any kind of help is appreciated.
Regards,
Ajaya
[[alternative HTML version deleted]]