[gdal-dev] GDAL Java Bindings - Unable to use same jar on linux and windows

johie jesse.hietanen at gmail.com
Tue Jan 5 06:33:49 PST 2016


Hi everyone,

I have a problem with the GDAL 2.1.0 DEV version. I'm developing an
application, which uses GDAL Java Bindings. I have been doing development
with windows, and been using the gisinternals GDAL binaries
(http://download.gisinternals.com/sdk/downloads/release-1800-x64-gdal-mapserver.zip),
from 18 december 2015. 

The problem is that I need to run the application with Centos 7 (OpenJDK
Java 8, SWIG 2.0.10), and there are no ready Java bindings (at least I have
not found). I downloaded the latest trunk from git (around same time when
installed the windows binaries, 20.12.2015), and build the gdal and swig
bindings succesfully. The problem seems to be somewhat different filenaming
inside the jar files. 

If I run my application inside windows using the centos made .jar, I get: 
java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.Dataset_SWIGUpcast(J)J
	at org.gdal.gdal.gdalJNI.Dataset_SWIGUpcast(Native Method)

If I run it on centos, with windows made .jar I get,

Exception in thread "main" java.lang.UnsatisfiedLinkError:
org.gdal.gdal.gdalJNI.SWIGDatasetUpcast(J)J
        at org.gdal.gdal.gdalJNI.SWIGDatasetUpcast(Native Method).

The only difference I can notice between them, is the name of those
methods/classes.

Any ideas how could I solve this problem? I would like to continue
developing with windows and then just move the shaded jar to the centos. I
did not have this problem when using the stable 2.0 version, however I need
some functionalities of the development version :)

Thanks a lot,

Jesse







--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-GDAL-Java-Bindings-Unable-to-use-same-jar-on-linux-and-windows-tp5243795.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list