java版GDAL环境报错--Native library load failed. java.lang.UnsatisfiedLinkError: no gdalalljni in java.

时间:2024-04-03 13:22:08

(windows版)

ERROR:

Native library load failed.
java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get()I

解决办法:

1、java GDAL下载:http://download.gisinternals.com/sdk.php

2、解压文件

3、把release-xxxx/bin/目录下的dll文件全部复制到你要使用的JDK版本%JAVA_HOME%/jre/bin/目录下;

java版GDAL环境报错--Native library load failed. java.lang.UnsatisfiedLinkError: no gdalalljni in java.

java版GDAL环境报错--Native library load failed. java.lang.UnsatisfiedLinkError: no gdalalljni in java. 

4、release-xxxx/bin/gdal/java/下的五个文件(gdal.jar、gdaljni.dll)复制到java工程根目录下,然后在项目中引入该gdal.jar文件。(再把gdaljni.dll复制到%JAVA_HOME%/jre/bin/);

java版GDAL环境报错--Native library load failed. java.lang.UnsatisfiedLinkError: no gdalalljni in java.

OK!!!!程序运行成功,问题解决!!!

参考博客:https://blog.51cto.com/1306733/1933283