[R-SIG-Mac] java version, perhaps related to ggplot2

Simon Urbanek @imon@urb@nek @ending from R-project@org
Thu May 24 19:47:43 CEST 2018


You need to configure R to match your Java using R CMD javareconf.

The CRAN machine uses JDK 1.9 which was the default until Java 10 was released recently. If you use something else, you have to configure R accordingly.

Also I strongly recommend using rJava 0.9-10 since it works around some issue with Java on macOS and with Java 10.

Cheers,
Simon





> On May 23, 2018, at 7:50 PM, David Winsemius <dwinsemius using comcast.net> wrote:
> 
> 
> 
>> On May 22, 2018, at 1:36 AM, Richard M. Heiberger <rmh using temple.edu> wrote:
>> 
>> sI have Macintosh High Sierra 10.13.4
>> and R_3.5.0
>> 
>> I am attempting to R CMD build and check my package microplot against
>> the imminent ggplot2_2.2.1.9000
>> 
> 
> I have a new High Sierra Machine with a System that was ported over from an earlier version of the OS. I've installed R 3.5.0.  I tried installing micro plot from binary without error, but when I try to load the rJava library I was getting an error with the old Java version 151, so I accepted the Oracle offer of installing version 171 downloaded from the Java website, but I'm also seeing:
> 
> library(rJava)
> Error: package or namespace load failed for ‘rJava’:
> .onLoad failed in loadNamespace() for 'rJava', details:
>  call: dyn.load(file, DLLpath = DLLpath, ...)
>  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so':
>  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/lib/server/libjvm.dylib
>  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so
>  Reason: image not found
> 
> 
> There is a folder  /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk, but nothing named with a jdk-9 prefix
> 
> 
> S
> Best;
> 
> David.
> 
>> The build fails with messages
>> 
>> ** byte-compile and prepare package for lazy loading
>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>> call: dyn.load(file, DLLpath = DLLpath, ...)
>> error: unable to load shared object
>> '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so':
>> dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so,
>> 6): Library not loaded:
>> /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/lib/server/libjvm.dylib
>> Referenced from:
>> /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so
>> Reason: image not found
>> ERROR: lazy loading failed for package ‘microplot’
>> 
>> Indeed I do not have Java 9, I have Java 8, which the Java updater
>> says is current (171).
>> The java site
>> http://www.oracle.com/technetwork/java/javase/overview/index.html
>> seems to want to give me Java 10 (not Java 9), and the discussion on
>> this R-sig-mac list
>>   [R-SIG-Mac] R and Java 10 ➜ rJava not able to build
>> beginning March 29 seems to say 8 is still correct.  As suggested
>> there I looked at R-admin for 3.5.0
>> and discover "The situation with Java support on macOS is messy".
>> I attempted the suggested workaround
>> JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
>> and got the same message as above.
>> 
>> I need guidance as to the next steps I should take.
>> 
>> Rich
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 



More information about the R-SIG-Mac mailing list