简体   繁体   English

在R中加载xlsx软件包时,为什么会出现“ JNI_GetCreatedJavaVMs返回-1”错误?

[英]Why do I get “JNI_GetCreatedJavaVMs returned -1” error while loading the xlsx package in R?

I just downloaded xlsx package in R, but I just can't use the library. 我只是在R中下载了xlsx软件包,但无法使用该库。 (On Mac) (在Mac上)

> library(xlsx)
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
Error : .onLoad failed in loadNamespace() for 'xlsx', details:
call: .jinit()
error: JNI_GetCreatedJavaVMs returned -1

Error: package or namespace load failed for ‘xlsx’

What am I doing wrong? 我究竟做错了什么?

Make sure you have installed the dependencies: 确保已安装依赖项:

  • xlsxjars xlsxjars
  • rJava Java语言

And, of course, if that does not work, verify you have the Java JDK installed in your mac: javac -version If not, just install it from here: https://java.com/en/download/faq/java_mac.xml 并且,当然,如果那行不通,请验证您的Mac中是否安装了Java JDK: javac -version如果没有,只需从以下位置进行安装: https : //java.com/en/download/faq/java_mac。 XML文件

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

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