[Gdal-dev] Java SWIG bindings

Collins, Benjamin collinsb at mitre.org
Wed Feb 8 09:44:42 EST 2006


>-----Original Message-----
>From: gdal-dev-bounces at lists.maptools.org 
>[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Norman
Barker
>Sent: Tuesday, February 07, 2006 12:10 PM
>To: gdal-dev at lists.maptools.org
>Subject: RE: [Gdal-dev] Java SWIG bindings
>Hi Ben,
>
>I have managed to compile the bindings, get the jar file etc. 
>and run java -cp .:../gdal.jar -Djava.library.path=..:../libs/ 
>gdalinfo dataname and it kind of works.
>
>However it complains of  Unable to load PROJ.4 library, and 
>even adding /usr/local/lib to java.library.path doesn't help.  
>Is this something you have come accross?
>
>Reading the JavaDocs, the use of NIO should make the data 
>transfer fast, so I am looking forward to getting it working.
>
>thanks,
>
>Norman
>

Anyone with similar issues should note that Proj is loaded dynamically
(by gdal, not java) and needs to be on the OSs library path.  This can
be accomplished simply by setting the environment variable
LD_LIBRARY_PATH=/usr/local/bin.  A better way would be to add the path
into the /etc/ld.so.conf file and regen the ld.so.cache with
/sbin/ldconfig.

See man page (or google) for ldconfig.

If there be a better way, please let me know.
--
Ben




More information about the Gdal-dev mailing list