Problem when trying to run Java in R:
JavaVM: requested Java version ((null)) not available. Using Java at "" instead. JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib JavaVM FATAL: Failed to load the jvm library.
I saw postings here about these issues, but none of the suggested fixes helped.
I'm on Mac OS 10.13.
My JAVA_HOME is: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
java -version java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
I'm using R: 3.3.3
Here is sample code that throws this error:
library(rJava)
.jinit() # this starts the JVM
s <- .jnew("java/lang/String", "Hello World!")
(this is the "hello world" equivalent from the rJava site)
I also tried to use Java 7 (rev. 51), which used to work, but that still fails.
I suspect Java itself is working fine since JDBC code has no issues.
Not sure why loading Java in R stopped working, but would appreciate any suggestions.
Thanks,