Is it possible to build a Java application with GDAL?

Is it possible to build a Java application with GDAL?

Note that ​ OSGeo4W includes a ​ gdal-java package and a Java runtime making it fairly easily to build local Java applications using GDAL. The following instructions describe how to build the Java bindings from scratch.

Which is the correct version of GDAL / OGR?

GDAL/OGR’s Java bindings correct operation are fairly sensitive to the version of SWIG used. Version 1.3.39 is appropriate for GDAL/OGR 1.8.0. A Windows version with a pre-built executable is available, so compiling isn’t necessary.

How to configure GDAL on Windows with SWIG?

Follow normal steps to configure GDAL by modifying < gdal-dir > make.opt. In addition to normal steps ensure that the SWIG, JAVA and ANT related definitions are set appropriately. Perhaps something like: See BuildingOnWindows for details on configuring and building GDAL on windows.

How do I build GDAL on Windows 10?

See BuildingOnWindows for details on configuring and building GDAL on windows. This step will run SWIG to generate the Java bindings (it will use nmake/cl.exe to build the C++ side of the Java bindings and ANT/javac to compile the java side of the bindings).

Where to find gdalogrinjavabuildinstructions in GDAL?

This step will run SWIG to generate the Java bindings (it will use nmake/cl.exe to build the C++ side of the Java bindings and ANT/javac to compile the java side of the bindings). The result, in the gdal/swig/java directory, should be the following files: gdal.jar, gdalconstjni.dll, gdaljni.dll, ogrjni.dll and osrjni.dll.

What should be the result of gdal.jar?

The result, in the gdal/swig/java directory, should be the following files: gdal.jar, gdalconstjni.dll, gdaljni.dll, ogrjni.dll and osrjni.dll. First, ensure that java.exe and javac.exe are available in your path and that any DLLs on which GDAL depends are in your path.