2012-02-21 24 views
2

我正尝试在64位机器上安装和使用JRI。我用64位JVM安装了R 2.14.1和rJava 0.9-3。我已成功使用命令64位环境中的JRI库的问题

install.packages(“rJava”)

但仍试图通过代码来访问它的时候,我收到以下错误R中安装rJava包,

Cannot find JRI native library! 
Please make sure that the JRI native library is in a directory listed in java.library.path. 

java.lang.UnsatisfiedLinkError: C:\Users\abc\Documents\R\win-library\2.14\rJava\jri\x64\jri.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform 
    at java.lang.ClassLoader$NativeLibrary.load(Native Method) 
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807) 
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732) 
    at java.lang.Runtime.loadLibrary0(Runtime.java:823) 
    at java.lang.System.loadLibrary(System.java:1028) 
    at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:19) 
    at com.mango.workflow.connector.r.internal.RExec.startR(RExec.java:160) 
    at com.mango.workflow.connector.r.internal.RExec.execute(RExec.java:288) 
    at com.mango.workflow.connector.r.RExecTest.testPlus(RExecTest.java:68) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) 
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) 
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) 
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) 
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) 
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) 
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) 
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69) 
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48) 
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) 
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) 
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) 
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) 
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) 
    at org.junit.runners.ParentRunner.run(ParentRunner.java:292) 
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) 
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) 
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) 
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) 
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) 
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) 
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) 

回答

2

我想你没有启动一个64位JVM您的应用程序:

无法加载AMD 64位.D一个IA 32位平台

或您的系统上LL是不是在所有64位。

+0

我想不会,因为我得到的命令提示符下此回应:C:\> Java的版本 Java版本 “1.6.0_24” 的Java(TM)SE运行时环境(建立1.6.0_24-B07) Java的热点( TM)64位服务器虚拟机(构建19.1-b02,混合模式) – sachinsd 2012-02-21 17:47:32

+0

您确定您的应用程序正在运行该JVM吗?你如何开始你的申请? – 2012-02-22 14:45:47

+0

我开始使用\ R-2.14.1 \ bin \ x64 \ Rgui.exe“,但无法看到它来检查它将引用哪个JVM ..我假定它连接到java虚拟机,我可以看到> java -version 。 – sachinsd 2012-02-23 12:04:14