[R] Problem when trying to run Java in R:
jdnewmil at dcn.davis.ca.us
Mon Oct 23 03:10:44 CEST 2017
I suggest asking a Mac-OS-specific question like this on the r-sig-mac mailing list. A common problem is attempting to access a 64-bit implementation of Java from a 32-bit version of R, or vice versa, but you may want to include the output of sessionInfo() and a reproducible example (both input and output) when you ask your question again to help them help you.
Sent from my phone. Please excuse my brevity.
On October 21, 2017 4:35:19 AM PDT, Morkus via R-help <r-help at r-project.org> wrote:
>Although running Java from R used to work, for some mysterious reason,
>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
>- 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:
>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:
> .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
>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
>Thanks very much,
>Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted
> [[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help