OS X seams to be looking for a legacy version 6 of Apple’s own build of Java. But it appears that OS X has problems recognizing newer versions Oracle’s Java. Both effects are pretty annoying! See the screen shot below on how that might look like.Īfter searching the web, the details of the problem are still not clear to me. Unfortunately, the package rJava does not just fail to load, but the R GUI for Mac terminates instantly and in RStudio the R-session gets closed. In what follows, I listed the steps that solved for me the problem that the package rJava could not be loaded from within RStudio under Mac OS X El Capitan (version 10.11.2). Furthermore, some new security features in Mac OS X prevent that environment path settings are passed along to applications like RStudio.
From what I understood, eventually, it is not a problem of rJava or R or RStudio in the first place, but newer versions of Mac OS X do not play well with the latest versions of Oracle’s Java (jdk). Since I upgraded my Mac to OS X El Capitan (version 10.11.2) I am having problems with the R-package rJava. Problem With rJava On Mac OS X El Capitan