[Gdal-dev] Java SWIG bindings
Norman Barker
nbarker at rsinc.com
Tue Feb 7 12:09:40 EST 2006
-----Original Message-----
From: Collins, Benjamin [mailto:collinsb at mitre.org]
Sent: Friday, February 03, 2006 3:57 PM
To: Norman Barker; gdal-dev at lists.maptools.org
Subject: RE: [Gdal-dev] Java SWIG bindings
LD_SHARED is often not definied in GDALmake.opt after a ./configure
(for some reason). I have temporarily solved the problem for GNU
platforms by changing the target to call LD and use the -shared flag.
This, as well as the hard-coded -fPIC flag, will not translate to other
platforms; be warned.
A CVS update should solve the problem in your case.
--
Ben Collins
-----Original Message-----
From: Norman Barker [mailto:nbarker at rsinc.com]
Sent: Friday, February 03, 2006 10:47 AM
To: Collins, Benjamin; gdal-dev at lists.maptools.org
Subject: RE: [Gdal-dev] Java SWIG bindings
-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org]On Behalf Of Collins,
Benjamin
<snip>
3. Import what you need of gdal.jar into your source and go! An
example is in the apps directory and is called gdalinfo.java. Here's
how to get it running:
- Go into the apps directory.
- Compile with 'javac -classpath ../gdal.jar gdalinfo.java'
- Run with 'java -cp ../gdal.jar -Djava.library.path=../.libs/
gdalinfo <filename>'
</snip>
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
More information about the Gdal-dev
mailing list