本文介绍了在 Win7 上加载 rJava 包的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了最新版本的 R (2.15.2) 和 Java (7.11),并通过 RStudio (0.97.310) 尝试加载 rJava 包.它似乎安装正确,但是当我调用 library(rJava) 时,出现以下错误:

I have installed the latest versions of R (2.15.2) and Java (7.11), and through RStudio (0.97.310) I am trying to load the rJava package. It seemed to install properly, but when I call library(rJava) I get the following error:

 Error : .onLoad failed in loadNamespace() for 'rJava', details:
 call: stop("No CurrentVersion entry in '", key, "'!
 Try re-installing Java and make sure R and Java have matching architectures.")
 error: object 'key' not found
 Error: package/namespace load failed for ‘rJava’

rJava 的文档参考了 Java 1.5+,所以我想知道我是否需要安装一个古老版本的 Java 来解决这个问题.任何帮助将不胜感激!

The documentation for rJava makes reference to Java 1.5+, so I am wondering if I need to install an ancient version of Java to resolve this problem. Any help would be much appreciated!

推荐答案

好的,我想通了.我猜我应该阅读 rJava 开发网站上的发行说明.我已经安装了 Java,但没有安装 JDK.安装后,一切正常.

Ok, I figured it out. Guess I should have read the release notes on the rJava development website. I had installed Java, but not the JDK. Once I installed that, everything worked fine.

这篇关于在 Win7 上加载 rJava 包的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 05:29