"No Java runtime" error on OS X 10.10 using Oracle 1.8.0 JVM

I have tried 3 different computers Mac OS X 10.10, R 3.1.2, Java 1.8.0_25 and rJava 0.9-7. In all three cases rJava is installed from source without error, but after running .jinit (), it fails to detect Java and Java 6 install requests from apple.

Something similar happens with Netlogo 5.1.0:

enter image description here

I've spent a few hours researching on the internet but haven't found a solution yet and tried different 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 it is Oracle related because rJava is loading the correct JVM, but the Oracle code is trying to fall back to Apple Java or something.

Any ideas?

+3


source to share


2 answers


These applications rely on Apple's legacy JVM and support that is being dropped by Yosemite. The Sun JDK and JRE do not include the same "bridging" code to run these applications, so on OSX you are still asking OSX to install the old Apple provided JRE so that they can run.



Until these applications rely on Apple's JRE, there is nothing you can do other than install legacy Java support.

+1


source


Following the link from sdza I found a solution. You need to install Apple Java, which will then actually allow you to use Oracle Java. Just install this: https://support.apple.com/kb/DL1572 and it should magically start working.



0


source







All Articles