[R] rJava help

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Apr 19 20:33:21 CEST 2007


On Thu, 19 Apr 2007, tkobayas wrote:

> I use Redhat Linux for R. Now I am trying to use the rJava library. I
> downloaded JRE beta 2 from Sun. I typed

I am not sure why, as JRE 1.6.0 was released a while back.

> root@~]# R CMD javareconf

In what R version?

> Java interpreter : /usr/bin/java
> Java version     : 1.6.0-beta2
> Java home path   : /usr/java/jre1.6.0

It probably should be /usr/java/jre1.6.0/jre: it certainly is in the 
released version of 1.6.0.

Did you perchance set JAVA_HOME incorrectly?  If you add Sun Java 1.x.y to 
a Fedora Core system, you need to add a java-xxx-sun-compat RPM (from 
jpackage.org), and I don't see why 'Redhat Linux' should be any different.

OTOH, on my system setting JAVA_HOME=/usr/java/jre1.6.0 seems to actually 
work, although Simon Urbanek tells me it is not as intended (and not what 
java will tell you its home is).

> Java library path:
> $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/lib:/usr/lib
> JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server
> -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L
> -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm
>
> when I try to install rJava, it says
>
> configure: error: jni headers not found. Please make sure you have a
> proper JDK installed.
> ERROR: configuration failed for package 'rJava'
> ** Removing '/usr/lib64/R/library/rJava'
>
> The downloaded packages are in
>        /tmp/Rtmp7RF5Qs/downloaded_packages
> Warning message:
> installation of package 'rJava' had non-zero exit status in:
> install.packages("rJava")
>
> How can I solve this?
>
> Thanks for help in advance.
>
> Taka
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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



More information about the R-help mailing list