[gdal-dev] JRE vs JDK

Ivan Lucena ivan.lucena at princeton-ma.us
Fri Oct 26 08:52:18 PDT 2012


Hi there,

I am getting this exception when loading gdal.jar:

*
Native library load failed.
java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.HasThreadSupport()I
*

If I change the script that launch my application to use the "java.exe" from the JDK instead of the JRE then the problem is gone. The problem is that users usually have only JRE. Right?

Anyway, It doesn't seems like there is nothing wrong with the GDAL built. I also try the same test with Tamas' binaries but got the same strange error.

An by looking at swig/include/java/*.i I can see that some of the loadLibrary would issue that message before the exception.

"WARNING : GDAL should be compiled with thread support for safe execution in Java."

But I am not getting it. So the error must be coming from loading "gdalconstjni.dll" or "osrjni.dll" but not "gdaljni.dll" or "ogrjni.dll"

I haven't tried that with Linux but I will.

I search for "java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.HasThreadSupport()I" on the web there are a hand full of question about that but none of the suggestions mentioned the JRE vs JDK issue.

Does anybody has a clue?

Regards,

Ivan


More information about the gdal-dev mailing list