[gdal-dev] javabindings
paul.malm at lfv.se
paul.malm at lfv.se
Thu Mar 11 02:53:08 PST 2021
Hi,
I've tried to install java bindings for GDAL this whole week. But is seems impossible for me to manage that.
I've read on internet a lot of discussions an tried solutions that other has suggested, but without success.
I have Windows 10,
Java 1.8.0
Eclipse 4.17.0
I installed gdal-302-1928-x64-core.msi from
https://www.gisinternals.com/query.html?content=filelist&file=release-1928-x64-gdal-3-2-1-mapserver-7-6-2.zip to
C:\Program Files
I've set the following "extra" Environment variables:
PATH:
C:\Program Files\Gdal\bin\gdal\apps;
C:\Program Files\Gdal\bin;
C:\Program Files\Gdal\bin\gdal;
C:\Program Files\Gdal\bin\gdal\java;
C:\Program Files\Gdal\bin\gdal\plugins-external
C:\Program Files\Gdal\bin\gdal\plugins
C:\Program Files\java-1.8.0-openjdk-1.8.0.201-1.b09.ojdkbuild.windows.x86_64\jre\bin;
Other environment variables I have set:
GDAL_BIN C:\Program Files\Gdal\bin
GDAL_DATA C:\Program Files\Gdal\bin\gdal-data
GDAL_DRIVER C:\Program Files\Gdal\bin\gdal\plugins
GDAL_DRIVER_PATH C:\Program Files\Gdal\bin\gdal\plugins
PROJ_LIB C:\Program Files\Gdal\bin\proj7\share
JAVA_HOME C:\Program Files\java-1.8.0-openjdk-1.8.0.201-1.b09.ojdkbuild.windows.x86_64\jre
Eclipse:
In run configurations I added the argument:
-Djava.library.path="C:\Program Files\Gdal\bin\gdal\java;${env_var:PATH}"
In java build path I added external library: C:\Program Files\Gdal\bin\gdal\java\gdal.jar
The error code I get is however I do/configure is:
Native library load failed.
java.lang.UnsatisfiedLinkError: C:\Program Files\Gdal\bin\gdal\java\gdalalljni.dll:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.HasThreadSupport()I
at org.gdal.gdal.gdalJNI.HasThreadSupport(Native Method)
at org.lfv.raster.TransformRaster.<init>(TransformRaster.java:64)
at org.lfv.raster.TransformRaster.main(TransformRaster.java:51)
When I run gdalinfo --formats
I get the following response:
ERROR 1: Can't load requested DLL: C:\Program Files\Gdal\bin\gdal\plugins\gdal_GEOR.dll
126: Det gÕr inte att hitta den angivna modulen.
ERROR 1: Can't load requested DLL: C:\Program Files\Gdal\bin\gdal\plugins\gdal_GEOR.dll
126: Det gÕr inte att hitta den angivna modulen.
ERROR 1: Can't load requested DLL: C:\Program Files\Gdal\bin\gdal\plugins\ogr_OCI.dll
126: Det gÕr inte att hitta den angivna modulen.
ERROR 1: Can't load requested DLL: C:\Program Files\Gdal\bin\gdal\plugins\ogr_OCI.dll
126: Det gÕr inte att hitta den angivna modulen.
Supported Formats:
BAG -raster,multidimensional raster,vector- (rw+v): Bathymetry Attributed Grid
ECW -raster- (rov): ERDAS Compressed Wavelets (SDK 5.5)
JP2ECW -raster,vector- (rov): ERDAS JPEG2000 (SDK 5.5)
FITS -raster,vector- (rw+): Flexible Image Transport System
GMT -raster- (rw): GMT NetCDF Grid Format
HDF4 -raster,multidimensional raster- (ros): Hierarchical Data Format Release 4
Etc...
As I'm listing, the files are there:
Directory of C:\Program Files\Gdal\bin\gdal\plugins
2021-03-11 08:58 <DIR> .
2021-03-11 08:58 <DIR> ..
2021-02-11 19:04 2 937 344 gdal_BAG.dll
2021-02-11 19:05 195 584 gdal_ECW_JP2ECW.dll
2021-02-11 19:05 205 824 gdal_FITS.dll
2021-02-11 19:03 412 672 gdal_GEOR.dll
2021-02-11 19:04 578 048 gdal_GMT.dll
2021-02-11 19:04 520 704 gdal_HDF4.dll
2021-02-11 19:04 520 704 gdal_HDF4Image.dll
2021-02-11 19:04 2 937 344 gdal_HDF5.dll
2021-02-11 19:04 2 937 344 gdal_HDF5Image.dll
2021-02-11 19:04 2 957 312 gdal_KEA.dll
2021-02-11 19:04 139 776 gdal_MG4Lidar.dll
2021-02-11 19:03 154 112 gdal_MrSID.dll
2021-02-11 19:04 578 048 gdal_netCDF.dll
2021-02-11 19:03 3 954 688 gdal_PDF.dll
2021-02-11 19:05 232 960 ogr_AmigoCloud.dll
2021-02-11 19:03 203 776 ogr_OCI.dll
Soon I don't have any hair left :-(
Is there someone who can say what I'm doing wrong.
Please..
/Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210311/62774c6c/attachment-0001.html>
More information about the gdal-dev
mailing list