Renjin 无法加载包
Renjin can't load pckages
我是 Renjin 的新手。我正在尝试在 Java 应用程序中使用 Renjin。我正在尝试开发显示 here.
的示例
我正在使用 gradle 进行编译,正如 renjin 的 web page 中所推荐的那样。
因此,当我 运行 gradle 构建时,gradle 构建一切正常。
Building with Renjin 0.8.2527
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:startScripts UP-TO-DATE
:distTar UP-TO-DATE
:distZip UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
BUILD SUCCESSFUL
Total time: 1.954 secs
但是,当我想要 运行 带有 gradle 运行 的应用程序时,我明白了。
Exception in thread "main" org.renjin.eval.EvalException: Could not load package a4Base; tried org.renjin.bioconductor:a4Base, org.renjin.cran:a4Base
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:131)
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:86)
at org.renjin.primitives.packaging.Packages.library(Packages.java:23)
at org.renjin.primitives.R$primitive$library.doApply(R$primitive$library.java:73)
at org.renjin.primitives.R$primitive$library.apply(R$primitive$library.java:34)
at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:55)
at org.renjin.eval.Context.evaluateCall(Context.java:270)
at org.renjin.eval.Context.evaluate(Context.java:194)
at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:46)
at org.renjin.eval.Context.evaluateCall(Context.java:270)
at org.renjin.eval.Context.evaluate(Context.java:194)
at org.renjin.eval.Context.evaluate(Context.java:162)
at org.renjin.sexp.Closure.doApply(Closure.java:108)
at org.renjin.eval.ClosureDispatcher.apply(ClosureDispatcher.java:76)
at org.renjin.eval.ClosureDispatcher.applyClosure(ClosureDispatcher.java:61)
at org.renjin.sexp.Closure.apply(Closure.java:82)
at org.renjin.eval.Context.evaluateCall(Context.java:270)
at org.renjin.eval.Context.evaluate(Context.java:194)
at org.renjin.eval.Context.evaluateExpressionVector(Context.java:253)
at org.renjin.eval.Context.evaluate(Context.java:192)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:150)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:109)
at com.flood.Statistics.testrenjin(Statistics.java:231)
at com.flood.Flood.main(Flood.java:22)
:run FAILED
FAILURE: Build failed with an exception.
我试过不同的包,结果相同。我在网站 http://packages.renjin.org/ 中搜索了软件包,发现这些软件包存在,所以我认为这与可用性无关。
有人遇到过同样的问题吗?并解决了?
提前致谢。
您需要将 a4base 包添加到您的项目中。
使用 gradle,您可以添加行:
dependencies {
compile "org.renjin.bioconductor:a4Base:1.27.0-b3"
}
并且 Gradle 将下载 JAR 并将其提供给您的应用程序。
您可以在此处阅读有关将 R 包与 Java 应用程序一起使用的更多信息:
http://docs.renjin.org/en/latest/library/using-packages.html
我是 Renjin 的新手。我正在尝试在 Java 应用程序中使用 Renjin。我正在尝试开发显示 here.
的示例我正在使用 gradle 进行编译,正如 renjin 的 web page 中所推荐的那样。
因此,当我 运行 gradle 构建时,gradle 构建一切正常。
Building with Renjin 0.8.2527
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:startScripts UP-TO-DATE
:distTar UP-TO-DATE
:distZip UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
BUILD SUCCESSFUL
Total time: 1.954 secs
但是,当我想要 运行 带有 gradle 运行 的应用程序时,我明白了。
Exception in thread "main" org.renjin.eval.EvalException: Could not load package a4Base; tried org.renjin.bioconductor:a4Base, org.renjin.cran:a4Base
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:131)
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:86)
at org.renjin.primitives.packaging.Packages.library(Packages.java:23)
at org.renjin.primitives.R$primitive$library.doApply(R$primitive$library.java:73)
at org.renjin.primitives.R$primitive$library.apply(R$primitive$library.java:34)
at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:55)
at org.renjin.eval.Context.evaluateCall(Context.java:270)
at org.renjin.eval.Context.evaluate(Context.java:194)
at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:46)
at org.renjin.eval.Context.evaluateCall(Context.java:270)
at org.renjin.eval.Context.evaluate(Context.java:194)
at org.renjin.eval.Context.evaluate(Context.java:162)
at org.renjin.sexp.Closure.doApply(Closure.java:108)
at org.renjin.eval.ClosureDispatcher.apply(ClosureDispatcher.java:76)
at org.renjin.eval.ClosureDispatcher.applyClosure(ClosureDispatcher.java:61)
at org.renjin.sexp.Closure.apply(Closure.java:82)
at org.renjin.eval.Context.evaluateCall(Context.java:270)
at org.renjin.eval.Context.evaluate(Context.java:194)
at org.renjin.eval.Context.evaluateExpressionVector(Context.java:253)
at org.renjin.eval.Context.evaluate(Context.java:192)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:150)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:109)
at com.flood.Statistics.testrenjin(Statistics.java:231)
at com.flood.Flood.main(Flood.java:22)
:run FAILED
FAILURE: Build failed with an exception.
我试过不同的包,结果相同。我在网站 http://packages.renjin.org/ 中搜索了软件包,发现这些软件包存在,所以我认为这与可用性无关。
有人遇到过同样的问题吗?并解决了?
提前致谢。
您需要将 a4base 包添加到您的项目中。
使用 gradle,您可以添加行:
dependencies {
compile "org.renjin.bioconductor:a4Base:1.27.0-b3"
}
并且 Gradle 将下载 JAR 并将其提供给您的应用程序。
您可以在此处阅读有关将 R 包与 Java 应用程序一起使用的更多信息:
http://docs.renjin.org/en/latest/library/using-packages.html