Search code examples
javaeclipsejaigeotools

java.lang.UnsatisfiedLinkError: no kdu_jni in java.library.path


I am trying to use GeoTiff to read TIFF file and I am having following warnings which lead to error.

Jul 29, 2016 12:53:41 PM it.geosolutions.imageio.gdalframework.GDALUtilities loadGDAL WARNING: Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won't be enabled.java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path Jul 29, 2016 12:53:41 PM it.geosolutions.util.KakaduUtilities loadKakadu WARNING: Failed to load the Kakadu native libs. This is not a problem unless you need to use the Kakadu plugin: it won't be enabled. java.lang.UnsatisfiedLinkError: no kdu_jni in java.library.path

How to solve this? I am using Eclipse and set Geotif path already in

 -Djava.libarary.path=E:/geotools-14.4-bin/geotools-14.4

Solution

  • The two most common reasons why you get java.lang.UnsatisfiedLinkError are:

    1. The native libraries that you are trying to load are not found. Does the directory E:/geotools-14.4-bin/geotools-14.4 contain the libraries gdaljni.dll and kdu_jni.dll?

    2. There is a mismatch of the "bitness" of your JVM and the native libraries: you are using 32-bit Java and the libraries are 64-bit or vice versa. Make sure that you use 64-bit Java if the libraries are 64-bit or vice versa.

    Did you make a typo? It should be java.library.path and not java.libarary.path (you misspelled "library").