0

I am trying to load rJava in order to use xlsx but I am getting the error below. installing of rJava seems fine:

> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/rJava_0.9-9.tgz'
Content type 'application/x-gzip' length 626627 bytes (611 KB)
==================================================
downloaded 611 KB


The downloaded binary packages are in
    /var/folders/5v/x1_rqyqj61qdwhttb57mt77c0000gn/T//Rtmp7YPzeb/downloaded_packages

then if I want to load the package rJava:

> 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.4/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
  Reason: image not found
In addition: Warning message:
package ‘rJava’ was built under R version 3.4.2 
yaennu
  • 85
  • 1
  • 9
  • There are packages that [do not require java](https://stackoverflow.com/questions/29254067/package-for-connecting-r-and-excel-without-the-java-virtual-machine). – zx8754 Nov 21 '17 at 09:05
  • @zx8754 perfect!!!! thanks a lot – yaennu Nov 21 '17 at 09:23

0 Answers0