Search code examples
javarrstudioosx-yosemite

R/RStudio, Yosemite, and Java


I upgraded to OSX Yosemite yesterday. When I run library(xlsx) in RStudio, the program crashes and I get the message: "To open 'RStudio' you need to install the legacy Java SE 6 runtime." I get the same result and message about opening R when I run library(xlsx) in R.

Here are my details:

Mac Yosemite, Version 10.10.2
R version 3.1.2 (2014-10-31) 
Platform: x86_64-apple-darwin13.4.0 (64-bit)

I have Java Version 8 update 31. I ran java -version and got this message: "No Java runtime present, requesting install." So I installed Java SE Development Kit 8u31. Now:

java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

This did not do the trick because running library(xlsx) still crashes the program and throws a warning. Do I need to somehow roll back to Java SE 6 runtime, or is there a way to use the latest version I have installed?

This SO post seems to be related, but I am not clear about the propsoed solution to install Java 6. The answer links to an apple support page that seems out of date.

I'm not familiar with Java, so I could use some advice.


Solution

  • instead the java you have installed download this one

    https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US

    after installing it, your problem will be solved