From simon.urbanek at r-project.org  Mon Sep 21 17:17:37 2009
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Mon, 21 Sep 2009 11:17:37 -0400
Subject: [Rd] R with Java
In-Reply-To: <20090921092732.212540@gmx.net>
References: <20090921092732.212540@gmx.net>
Message-ID: <454724C2-4472-4CBC-BCD3-12D3E2B7DAA1@r-project.org>


On Sep 21, 2009, at 5:27 , Nadine Bethke wrote:

> Hey,
> I?m a newbie in R and have a big problem. I hope, I?m in the right  
> mailinglist, if not, sorry for this.

Please use the stats-rosuda-devel mailing list:
http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel

You may want to look at the archives, because roughly this question  
has been asked before.


> I want to use R in my Java application and I found out, it should  
> work with JRI. But it doesn?t. I installed it and in the lib- 
> directory of R there is a folder named "JRI". But I have to tell  
> Eclipse that the JRI exist but I don?t know how. I read help-files  
> and so on, but I don?t understand. Could you give me a simple  
> instruction how to do this?

Not really since I don't use Eclipse, but in general you just have to  
make sure that the necessary JAR files are on your class path, then  
you have to make sure Eclipse sets the java library path to the path  
with the jri.dll and finally PATH must contain the directory of R.dll.

(Also since this is a new project, you may consider using the high- 
level REngine API instead of the low-level JRI API. In addition,  
unless you have a specific reason for using JRI (R embedding) there  
are more simple solutions such as Rserve based on the same API - but  
the choice depends on what exactly your applications is doing)

Cheers,
Simon



[Rd] R with Java
Simon Urbanek