<br><br><div dir="ltr"><div><p style="margin:0px 0px 1.2em!important">Hi:<br>I tried to use gdal with java in window 10,and I installed gdal from the pre-built binary from “<a href="https://www.gisinternals.com/" target="_blank">https://www.gisinternals.com/</a><wbr>“.<br>Then I set the required environment variables by following this topic:  <a href="https://docs.geoserver.org/stable/en/user/data/raster/gdal.html" target="_blank">https://docs.geoserver.org/<wbr>stable/en/user/data/raster/<wbr>gdal.html</a><br>After that, I tried to validate this in jshell:<br>First check the environment variables are set properly: </p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">C:\Users\xx>echo %Path%
C:\Program Files (x86)\NetSarang\Xshell 6\;C:\WINDOWS\system32;C:\<wbr>WINDOWS;C:\WINDOWS\System32\<wbr>Wbem;C:\WINDOWS\System32\<wbr>WindowsPowerShell\v1.0\;C:\<wbr>Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\System32\<wbr>OpenSSH\;C:\Go\bin;C:\Program Files\Pandoc\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Users\xx\<wbr>AppData\Local\Microsoft\<wbr>WindowsApps;D:\program\jdk_<wbr>jre\jdk\bin;C:\Users\xx\<wbr>AppData\Local\Programs\<wbr>Fiddler;C:\Program Files\QGIS 2.18\bin;C:\Python27;%GOPATH%\<wbr>bin;C:\Users\xx\AppData\Local\<wbr>Microsoft\WindowsApps;C:\<wbr>Program Files\Bandizip\;C:\Program Files\Docker\Docker\resources\<wbr>bin;C:\Users\xx\go\bin;C:\<wbr>Program Files\Docker Toolbox;C:\Users\xx\AppData\<wbr>Local\Yarn\bin;D:\program\<wbr>gdal-3.2-dev-mapserver\bin\<wbr>gdal\java;D:\program\gdal-3.2-<wbr>dev-mapserver\bin;

C:\Users\xx>echo %PROJ_LIB%
D:\program\gdal-3.2-dev-<wbr>mapserver\proj6\share

C:\Users\xx>echo %GDAL_DATA%
D:\program\gdal-3.2-dev-<wbr>mapserver\bin\gdal-data
</code></pre><p style="margin:0px 0px 1.2em!important">Then tried to load the jni library:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">C:\Users\xx>jshell
|  Welcome to JShell -- Version 11.0.8
|  For an introduction type: /help intro

jshell> System.loadLibrary("<wbr>gdalalljni")
|  Exception java.lang.<wbr>UnsatisfiedLinkError: D:\program\gdal-3.2-dev-<wbr>mapserver\bin\gdal\java\<wbr>gdalalljni.dll: The specified procedure could not be found
|        at ClassLoader$NativeLibrary.<wbr>load0 (Native Method)
|        at ClassLoader$NativeLibrary.load (ClassLoader.java:2430)
|        at ClassLoader$NativeLibrary.<wbr>loadLibrary (ClassLoader.java:2487)
|        at ClassLoader.loadLibrary0 (ClassLoader.java:2684)
|        at ClassLoader.loadLibrary (ClassLoader.java:2649)
|        at Runtime.loadLibrary0 (Runtime.java:827)
|        at System.loadLibrary (System.java:1871)
|        at (#1:1)

jshell> /exit
|  Goodbye
</code></pre><p style="margin:0px 0px 1.2em!important">As shown, the jni library can not be loaded correctly.</p>
<p style="margin:0px 0px 1.2em!important">Then reset the environment variables again in the terminal:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">C:\Users\xx>SET PATH=%PATH%;D:\program\gdal-3.<wbr>2-dev-mapserver\bin\;D:\<wbr>program\gdal-3.2-dev-<wbr>mapserver\bin\gdal\java;

C:\Users\xx>SET PROJ_LIB=D:\program\gdal-3.2-<wbr>dev-mapserver\bin\proj6\share;

C:\Users\xx>SET GDAL_DATA=D:\program\gdal-3.2-<wbr>dev-mapserver\bin\gdal-data;

C:\Users\xx>jshell
|  Welcome to JShell -- Version 11.0.8
|  For an introduction type: /help intro

jshell> System.loadLibrary("<wbr>gdalalljni")

jshell>
</code></pre><p style="margin:0px 0px 1.2em!important">As shown, it worked.</p>
<p style="margin:0px 0px 1.2em!important">Why do I have to reset the environment variables again ?</p>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZGVmYXVsdCIgc3R5bGU9ImZvbnQtZmFtaWx5OmFyaWFsLGhlbHZl
dGljYSxzYW5zLXNlcmlmIj5IaTo8YnI+SSB0cmllZCB0byB1c2UgZ2RhbCB3aXRoIGphdmEgaW4g
d2luZG93IDEwLGFuZCBJIGluc3RhbGxlZCBnZGFsIGZyb20gdGhlIHByZS1idWlsdCBiaW5hcnkg
ZnJvbSAiaHR0cHM6Ly93d3cuZ2lzaW50ZXJuYWxzLmNvbS8iLjxicj5UaGVuIEkgc2V0IHRoZSBy
ZXF1aXJlZCBlbnZpcm9ubWVudCZuYnNwO3ZhcmlhYmxlcyBieSBmb2xsb3dpbmcgdGhpcyB0b3Bp
YzombmJzcDsmbmJzcDtodHRwczovL2RvY3MuZ2Vvc2VydmVyLm9yZy9zdGFibGUvZW4vdXNlci9k
YXRhL3Jhc3Rlci9nZGFsLmh0b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