Re: [Rd] Call R function from Java

From: way4thesub <>
Date: Thu 13 Jul 2006 - 02:42:39 GMT


I am currently attempting to use JRI to call data mining functions in R (ie rpart, lda, etc). I am using Eclipse 3.1.1 and jre1.5.0_06 and jdk1.5.0_07.

I am unsure how to actually import JRI into eclipse. I've downloaded the JGR, the rJava and the JRI. I've included the jri.jar file in my eclipse project and eclipse recognized the classes and interfaces. However when I went to execute the program it gave me an error about the correct libraries not being there.

I therefore included the following code:

   System.load("C:\\Program Files\\R\\R-2.2.1\\bin\\R.dll");
   System.load("C:\\Program Files\\R\\R-2.2.1\\bin\\Rblas.dll");		

(and the 3 files actually exist in those locations)

However, it turns out R.dll depends upon Rblas.dll and vice versa so I can never actually get it to work without throwing a "UnsatisfiedLinkError." What am I doing wrong?

I'm sorry this is such an easy question but with the lack of FAQ's and examples of JRI, I'm forced to ask it.


View this message in context:
Sent from the R devel forum at

______________________________________________ mailing list
Received on Thu Jul 13 13:10:08 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 13 Jul 2006 - 08:24:20 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.