Trouble Installing and Loading Rjava on MAC El Capitan

trouble installing and loading rJava on mac El Capitan

The problem was rJava wont install in RStudio (Version 1.0.136). The following worked for me (macOS Sierra version 10.12.6) (found here):

Step-1: Download and install javaforosx.dmg from here

Step-2: Next, run the command from inside RStudio:

install.packages("rJava", type = 'source')

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!

Cannot install rJava on Big Sur

JRI is currently not supported on Big Sur, because Apple has removed the last traces of Java support - here the JavaVM framework, so you have two options:

  1. use --disable-jri when installing rJava from sources (e.g. via install.packages("rJava", configure.args="--disable-jri"))

  2. use rJava from CRAN (i.e., install the binary version of rJava - not source)

The issue tracking this is #248

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



Related Topics



Leave a reply



Submit