R, loading rJava error

前端 未结 2 734
时光取名叫无心
时光取名叫无心 2020-12-06 12:35

I\'m running R (version 3.4.0) on macOS sierra (10.12.5) and I\'m trying to use the xlsx library which requires the use of the rJava library.

When I try to load rJav

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 13:01

    It works!

    After installing and reinstalling different java versions and reinstalling rJava with the R command install.packages("rJava") I got to the point where loading the library in the R console (shell window) didn't throw an error message anymore.

    After that I was able to use the answer in this post to get it to work in RStudio by running this shell command:

    sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
    

    Not too complicated after all! Thank you for everyones patience.

提交回复
热议问题