[R] help updating package rJava (on ubuntu)

Karl Brand k.brand at erasmusmc.nl
Sat Feb 18 16:44:25 CET 2012

Esteemed useRs and Devs,

Attempts to update package:rJava to the latest version have failed. See 
my code and output below.

Notably, as suggested here 

$ sudo apt-get install r-cran-rjava

ran successfully without error or warning, but my rJava package is not 
updated, and remains un-updatable...

Greatly appreciate any suggestions getting my rJava updated,


 > update.packages(lib.loc = "/usr/lib/R/site-library")
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
rJava :
  Version 0.9-1 installed in /usr/lib/R/site-library
  Version 0.9-3 available at http://cran.xl-mirror.nl
Update (y/N/c)?  y


checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver    : ''
compiler    : ''
header prep.: ''
cpp flags   : ''
java libs   : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server 
-L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm'
configure: error: Java Development Kit (JDK) is missing or not 
registered in R
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

...so i do as suggested:

$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.6.0_23
Java home path   : /usr/lib/jvm/java-6-openjdk/jre
Java compiler    : not present
Java headers gen.:
Java archive tool:
Java library path: 
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server 
-L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 
-L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm
JNI cpp flags    :

Updating Java configuration in /etc/R

But i still get the same error when trying to update rJava!

 > sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-pc-linux-gnu (64-bit)

  [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_AU.UTF-8
  [7] LC_PAPER=C                 LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

Karl Brand
Department of Genetics
Erasmus MC
Dr Molewaterplein 50
3015 GE Rotterdam
T +31 (0)10 704 3455 |F +31 (0)10 704 4743 |M +31 (0)642 777 268

More information about the R-help mailing list