eclipse error :"java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.AllRegister()V"

时间:2018-07-25 04:33:29

标签: java eclipse centos7 gdal

While using gdal jar in eclipse on centos i get the error as

"java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.AllRegister()V"

although I have added gdal-2.1.0 jar in my eclipse project

static {
                    System.out.println("GDAL init...");
                    gdal.AllRegister();
                    int count = gdal.GetDriverCount();
                    System.out.println(count + " available Drivers");
                    for (int i = 0; i < count; i++) {
                            try {
                                    Driver driver = gdal.GetDriver(i);
                                    System.out.println(" " + driver.getShortName() + " : "
                                                    + driver.getLongName());
                            } catch (Exception e) {
                                    System.err.println("Error loading driver " + i);
                            }
                    }
         }

1 个答案:

答案 0 :(得分:0)

在尝试使用gdal 2.3.1和gdal 2.3.0之后,我了解到的是gdal 2.3.x jar文件中的Java绑定存在一些问题,因此我移到了gdal的python绑定中。