Can't install rJava 0.9 on Ubuntu 10.04 Can't install rJava 0.9 on Ubuntu 10.04 r r

Can't install rJava 0.9 on Ubuntu 10.04


Dah, not long after posting I found the answer here:

http://r-interface.blogspot.com/2012/04/install-r-jgr-and-deducer-in-ubuntu.html

Although I already had Sun Java installed, the key was to run update-java-alternatives to actually switch to Sun Java first before running javareconf:

sudo update-java-alternatives -s java-6-sunsudo R CMD javareconf


One other (relatively obvious) warning: don't do what I did and install both java6 and java7. That led to a conflict I was unable to 'fix' via specifying paths and environment variables. Removing both and reinstalling java6 led to successful installation of JGR.( This under ubuntu precise, on an Apple G4 powerbook)


Here's another option:

before running R, do this

export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/server

(for path above, substitute location of your particular libjvm.so, if you have a different configuration). To find libjvm.so, you can do

sudo updatedb && locate libjvm.so