How to Get Rjava 0.9-3 to Work on Os X 10.7.4 with Oracle Java 1.7

R: rJava package install failing

Turns out my problem was an issue with my JAVA_HOME environment variable. Yes, shocking I know. My initial setting for PATH and JAVA_HOME looked like this:

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin

And I added /jre so it now looks like this:

export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
export PATH=$PATH:$JAVA_HOME/bin

Everything in Java seemed to work fine without the /jre but rJava would not. Odd.

rJava load error in RStudio/R after upgrading to OSX Yosemite

I had the same problem and went through the same steps as you. The final step to allow starting RStudio through Finder/Spotlight was to link libjvm.dylib to /usr/local/lib:

sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib

-f flag is added to force overwriting existing file/link

Using Rjava on Mac. Relevant library libjvm.dylib does not exist

You don't have to make symbolic links etc. You simply need to properly configure Java and R to get them running smooth.

Take a look here: R, Java, rJava and macOS adventures

Recently, I have updated this entry for more recent R - R 3.4. Take a look here: R 3.4, rJava, macOS and even more mess ;)

Maybe this time it will help ;)

Trouble installing rJava on Mac ; trouble with JNI data types

I finally resolved this, via a solution I found here.

The new Mac OS X (10.11, El Capitan) has trouble with env variables.


The newest dev flavor of rJava manages to handle things correctly. Here is what I did to resolve it:

  1. Download version 0.9-8 (rJava_0.9-8.tar.gz) from here
  2. Install it from the downloaded source:

    $ R CMD INSTALL ~/Downloads/rJava_0.9-8.tar.gz

(Or wherever you put it)

That's all it took!



Related Topics



Leave a reply



Submit