Sagar,
this is normally just a matter of having all the needed .so (libgdal.so and the
4 JNI .so) in your LD_LIBRARY_PATH and gdal.jar in your java classpath.
I'd encourage you to try on the command line first.
See http://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructionsUnix
__
Even,
I am actually trying to run the ogr2ogr.java from the link which you have
specified. In that if I don't load all the .so files individually it gives
me an exception at .AllRegister() method and the execution stops, but when I
load them individually it catches the exception and displays the
Sagar,
don't load the .so directly. Let gdal.jar do the dirty work for you !
Use the import org.gdal.XXX imports and then gdal.AllRegister() or
ogr.RegisterAll() instead.
See the examples in
http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps
Le jeudi 07 octobre 2010 11:03:36, sagar_
Hi Even,
Thanks for that, that error has been resolved. But the following warning as
keeps coming , would you know what this means:
Native library load failed.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path
I am loading all the .so files individually
S
Le mercredi 06 octobre 2010 16:35:38, sagar_sahay a écrit :
> After tweaking the path variable I got this exception:
>
> Native library load failed.
> java.lang.UnsatisfiedLinkError:
> /home/gdal/gdal-1.7.2/swig/java/libgdaljni.so:
> /home/gdal/gdal-1.7.2/swig/java/libgdaljni.so: wrong ELF class:
After tweaking the path variable I got this exception:
Native library load failed.
java.lang.UnsatisfiedLinkError:
/home/gdal/gdal-1.7.2/swig/java/libgdaljni.so:
/home/gdal/gdal-1.7.2/swig/java/libgdaljni.so: wrong ELF class: ELFCLASS64
(Possible cause: architecture word width mismatch)
Exception
Ivan,
I have specified -Djava.library.path="~/home/gdal/gdal-1.7.2/swig/java". Is
there any other way to include the files which you had mentioned in the
reply. If so please let me know.
Thanks,
Sagar
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/GDAL-JAVA-problem-tp
,
Ivan
> ---Original Message---
> From: sagar_sahay
> To: gdal-dev@lists.osgeo.org
> Subject: [gdal-dev] Re: GDAL JAVA problem
> Sent: Oct 06 '10 08:43
>
>
> Hi Ivan,
>
> Can you please help me with compiling the GdalInfo class in Ubuntu with
Hi Ivan,
Can you please help me with compiling the GdalInfo class in Ubuntu with
Netbeans. My problem is that the program is throwing an exception when it
reaches the gdal.AllRegister() method and the exception says the following:
Native library load failed.
java.lang.UnsatisfiedLinkError: no gd