How to Make Rjava Use the Newer Version of Java on Osx

Getting R to use newer versions of java

Seems like on Mac OS X you can have multiple Java at a one time.

Use below command on terminal to check how many JDK version you have.

/usr/libexec/java_home -V

You can follow below instruction to have correct Java Path setup:

How To Set $JAVA_HOME Environment Variable On Mac OS X

In nutshell do:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

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