【问题标题】:XGBoost Java Implementation : java.lang.UnsatisfiedLinkError when using DMatrix from XGBoost PackageXGBoost Java 实现:使用 XGBoost 包中的 DMatrix 时出现 java.lang.UnsatisfiedLinkError
【发布时间】:2016-07-05 13:55:01
【问题描述】:

我在 Windows 8.1 中使用带有 maven 插件的 eclipse luna。我已经通过运行 create_Jni.bat 在 xgboost4j/src/main/resources/lib/xgboost4j.dll 中放置了 xgboost4j.dll(重命名 libxgboost.dll,它是通过在 xgboost 文件夹中运行“make”产生的)。当我在示例包中运行 BasicWalkThrough.java 时,它会输出以下错误

Exception in thread "main" java.lang.UnsatisfiedLinkError:ml.dmlc.xgboost4j.java.XGBoostJNI.XGDMatrixCreateFromFile(Ljava/lang/String;I[J)I
    at ml.dmlc.xgboost4j.java.XGBoostJNI.XGDMatrixCreateFromFile(Native Method)
    at ml.dmlc.xgboost4j.java.DMatrix.(DMatrix.java:83)
    at ml.dmlc.xgboost4j.java.example.BasicWalkThrough.main(BasicWalkThrough.java:52)

请让我知道我做错了什么。

提前致谢。

【问题讨论】:

  • 嘿...我在 Windows 7 中遇到了同样的问题。您有什么解决方案吗?

标签: java dll xgboost


【解决方案1】:

xgboost 目前在 Windows 上不受支持,请参见此处: https://github.com/dmlc/xgboost/issues/1051

在 linux/OS X 上,我通过将 JAVA_HOME 设置为 jdk 目录并安装 gcc 解决了这个问题。

【讨论】:

  • 次要更新:当前版本确实支持 Windows。适用于 Linux OS X 和 Windows 的非官方 JAR 可用 here。
猜你喜欢
  • 2018-03-20
  • 2017-08-02
  • 1970-01-01
  • 2016-05-19
  • 2017-05-10
  • 1970-01-01
  • 1970-01-01
  • 2021-07-17
  • 1970-01-01
相关资源
最近更新 更多