Reputation: 1052
I've tried 3 different Macs running OS X 10.10, R 3.1.2, Java 1.8.0_25, and rJava 0.9-7. In all three cases rJava installs from source without error but after running .jinit(), fails to detect Java and prompts to install Java 6 from apple.
Something similar happens with Netlogo 5.1.0:
I've spent hours researching online, but haven't yet found a solution and tried various things like manually setting JAVA_HOME and LD_LIBRARY_PATH to no avail.
R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.8.0_25
Java home path : /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
...
~ % echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre
~ % echo $LD_LIBRARY_PATH
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/server
~ % R CMD INSTALL rJava_0.9-7.tar.gz
~ % R
library('rJava')
.jinit()
No Java runtime present, requesting install.
I suspect this has to do with Oracle, because rJava loads the correct JVM, but Oracle's code attempts to fall back to Apple Java or something like that.
Any ideas?
Upvotes: 4
Views: 1807
Reputation: 996
Following the link from sdza , I found the solution. You need to install Apple's Java, which will then actually let you use Oracle's Java as well. Just install this: https://support.apple.com/kb/DL1572 and it should magically start working.
Upvotes: 0
Reputation: 40333
These apps rely on Apple´s old JVM and support, which is gone on Yosemite. Sun´s JDK and JRE do not include the same "bridge" code to run these apps so OSX you still ask you to install the old Apple provided JRE so they can be run.
Until these apps are made not to rely on Apple´s JRE there is nothing else you can do other than installing the legacy Java support.
Upvotes: 1