[R] Problem when trying to run Java in R:

Morkus morkus at protonmail.com
Sat Oct 21 13:35:19 CEST 2017


Hello All,

Although running Java from R used to work, for some mysterious reason, it's stopped.

Today when I tried to load a basic JDBC driver (or the sample .jinit()) code, I got:

- 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 on StackOverflow about this issue, 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 also throws this same 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.

Also tried a fresh install of R/RStudio on another machine with the same results (same Java version, etc., however).

I suspect Java itself is working fine since JDBC code from Java programs has no issues.

Not sure why loading Java in R stopped working, but would appreciate any suggestions.

Thanks very much,

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
	[[alternative HTML version deleted]]



More information about the R-help mailing list