“unable to load shared object” when loading the rJava library

前端 未结 2 553
生来不讨喜
生来不讨喜 2021-01-24 18:27

I apologize in advance for my bad english, i hope that someone can help me. I have to load an Excel file .xlsx on R, but:

library(xlsx)
2条回答
  •  孤城傲影
    2021-01-24 19:03

    This was happening to me as well (also Windows 10), and the problem with mine was that the environment variable was not set properly. In my case, I had to do

    Sys.setenv('JAVA_HOME' = 'C:/Program Files (x86)/Java/jre1.8.0_161/')
    

    Just change the folder name to where Java lives in your computer, and let me know if this doesn't work out.

提交回复
热议问题