Thx a lot for your suggestions.<br><br>In my previous attempts, I already tried your solution by setting (under eclipse) the VM arguments with the java library path variable, properly linking to a shared folder.<br>However, even without MrSID support, I have the same problem.
<br><br>So, my first objective is understanding how to make GDAL working without MrSID from java. <br>Then, I will add again MrSID support.;)<br><br>Thx for your help.<br><br>Regards,<br>Daniele<br><br><br><div><span class="gmail_quote">
On 8/13/07, <b class="gmail_sendername">Collins, Benjamin</b> <<a href="mailto:collinsb@mitre.org">collinsb@mitre.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Because of the GCC version mismatch between the MrSID DSDK and modern<br>Linux distros, I have not had the chance to get MrSID going either. I<br>would note, however, that generally one should add a parameter to the<br>jvm like:
<br> -Djava.library.path=<relative path to libs><br>instead of copying the libraries to a shared location.<br><br>On Windows, the MrSID DSDK requires an additional library (DLL) be<br>present at runtime. Since the GDAL binding is the one that 'loads' it,
<br>the -D flag will generally not help finding it, unless you artificially<br>load it yourself in java before GDAL tries to. This can be<br>accomplished with a call like:<br> System.loadLibrary("lti_dsdk_dll"); //FOR WINDOWS, pre-load the DSDK
<br> gdal.AllRegister(); //then start GDAL<br>This works on Windows, something like it may be necessary on Linux.<br><br>Sorry I could not provide more specifics. If you got MrSID compiled in<br>at all, you're probably close to success.
<br>--<br>Ben<br><br>>-----Original Message-----<br>>From: <a href="mailto:gdal-dev-bounces@lists.maptools.org">gdal-dev-bounces@lists.maptools.org</a><br>>[mailto:<a href="mailto:gdal-dev-bounces@lists.maptools.org">
gdal-dev-bounces@lists.maptools.org</a>] On Behalf Of<br>>Daniele Romagnoli<br>>Sent: Monday, August 13, 2007 6:36 AM<br>>To: <a href="mailto:gdal-dev@lists.maptools.org">gdal-dev@lists.maptools.org</a><br>>Subject: [Gdal-dev] GDAL Java Binding on Linux
<br>><br>>Hi guys.<br>>I have some problems using GDAL java bindings on linux.<br>><br>>I'm using Fedora Core 6.<br>>I downloaded GDAL from SVN, TAG 1.4.2.<br>>I added MrSID support and I built GDAL. (I downloaded the
<br>>GeoDSDK from Lizardtech, version 6.0.7.1047, for linux x86.gcc34)<br>><br>>It works fine... I can successfully use gdalinfo with a MrSID<br>>file sample.<br>><br>>The GDAL/.libs folder contains 3 files:
libgdal.so.1.11.2,<br>>libgdal.so and libgdal.so.1 (last 2 are symbolic links)<br>>Next step is building Java Binding through SWIG.<br>><br>>I launched:<br>>cd swig<br>>gmake<br>>cd java<br>>gmake<br>
><br>>I built the 4 .so (libgdaljni.so, libgdalconstjni.so,<br>>libogrjni.so and libosrjni.so) without any error.<br>><br>>Then, I put all .SO and Lizardtech lib in<br>>java/JDKversion/jre/lib/i386 and launched eclipse.
<br>>I written a little section of code which uses GDAL and I<br>>received the error in the attached file.<br>><br>>Since I'm not an expert Linux user, I'm surely doing some wrong<br>things.<br>><br>
>Somewhere, I read that I would have to build GDAL with the<br>>same version of GCC used to build the MrSID lib provided by<br>>lizardtech.<br>>Fedoracore6 uses GCC 4.1.1 but, checking some forums, I think<br>
>that this error is unrelated with the gcc version but is<br>>simply an error due to a wrong use of the .so.<br>><br>>As my last recent attempt, I built GDAL without MrSID support<br>>and tried the GDALTest java application available in
<br>>gdal/swig/java but I received the same error.<br>>The strange thing is that GDALTest successfully call<br>>gdal.AllRegister() as well as gdal.getDriverCount() and<br>>similar things.<br>>Furthermore, I open a BMP file and I successfully obtain a
<br>>Dataset instance (Not null).<br>>The error occurs when the code does: dataset.getDriver ()<br>><br>>So, I'm pretty sure I'm wrong in the use of the .SO.<br>>Any suggestion/question to help me solving my problems?
<br>><br>>Thank you very much.<br>><br>><br>>--<br>>Best Regards,<br>>Daniele Romagnoli<br>><br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br>Daniele Romagnoli