简体   繁体   English

安装 rJava package 的问题

[英]Problems with installing rJava package

I have tried to call the library xlsx, since I want to save data in multiple-sheets excel files, but I got a Java-related error.我试图调用库 xlsx,因为我想将数据保存在多张 excel 文件中,但出现与 Java 相关的错误。 Even when I run library(rJava) I have this error code:即使我运行 library(rJava) 我也有这个错误代码:

Error: package or namespace load failed for 'rJava': .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared object 'C:/Users/me/Documents/R/win-library/4.0/rJava/libs/x64/rJava.dll': LoadLibrary failure: The specified module could not be found.错误:package 或“rJava”的命名空间加载失败:“rJava”的 loadNamespace() 中的 .onLoad 失败,详细信息:调用:inDL(x, as.logical(local), as.logical(now), ...)错误:无法加载共享 object 'C:/Users/me/Documents/R/win-library/4.0/rJava/libs/x64/rJava.dll':LoadLibrary 失败:找不到指定的模块。

The solutions I have found online are quite old and none helped to solve the issue: I have tried to reinstall Java 64 bit on my OS (Windows 10-64bit), and the package rJava, I have tried to set Java home with Sys.setenv(JAVA_HOME="C:\Program Files\Java\jre1.8.0_271\") without success. The solutions I have found online are quite old and none helped to solve the issue: I have tried to reinstall Java 64 bit on my OS (Windows 10-64bit), and the package rJava, I have tried to set Java home with Sys. setenv(JAVA_HOME="C:\Program Files\Java\jre1.8.0_271\") 没有成功。 I use R 64 bit.我使用 R 64 位。 Do you have any suggestions?你有什么建议吗?

Finally, the solution reported here worked for me.最后, 这里报告的解决方案对我有用。 The most important thing is to download the offline version of Java最重要的是下载离线版Java

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM