From ripley at stats.ox.ac.uk  Thu Jul 13 08:21:09 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 13 Jul 2006 07:21:09 +0100 (BST)
Subject: [Rd] Call R function from Java
In-Reply-To: <5301125.post@talk.nabble.com>
References: <20060707125037.77447.qmail@web53104.mail.yahoo.com>
	<1B6A26B0-3CD6-4B65-8A0E-FE780D06B231@r-project.org>
	<f20482fc0607071105h618f15aft980a3b09d2e4c267@mail.gmail.com>
	<1D19ABC5-BD9A-4280-BD16-383DD06B862F@r-project.org>
	<5301125.post@talk.nabble.com>
Message-ID: <Pine.LNX.4.64.0607130719350.4346@gannet.stats.ox.ac.uk>

Please do study the posting guide and consult the maintainer (as it asked 
you to do) with basic information (such as your OS) and the exact messages 
you received.

As a guess: your PATH does not include the R DLLs and needs to?

On Wed, 12 Jul 2006, way4thesub wrote:

> 
> Hello,
> 
> 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");		
>    System.load("C:\\jri\\jri.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.
> 
> Adam
> 		
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Call R function from Java
Prof Brian Ripley