<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">Hello,</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">I'm new in
mapserver stuff and I'm trying to use Java Mapscript without any success.</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">My
environment is:</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<ul style="margin-top: 0cm;" type="disc"><li class="MsoNormal" style="color: rgb(127, 0, 85);"><b><span style="font-size: 10pt;">Windows XP</span></b></li><li class="MsoNormal" style="color: rgb(127, 0, 85);"><b><span style="font-size: 10pt;">
MS4W version 4.10.1.</span></b></li><li class="MsoNormal" style="color: rgb(127, 0, 85);"><b><span style="font-size: 10pt;">JDK 1.6.0_01</span></b></li><li class="MsoNormal" style="color: rgb(127, 0, 85);"><b><span style="font-size: 10pt;">
Eclipse </span></b></li></ul>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">I wanted to
test some Java Mapscript functionality with a simple Java program whose code is
the following:</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">-----------------------------------------------------------------------</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">…</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">import edu.umn.gis.mapscript.*;</span></b></p>



<p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">&nbsp;public class ProvaMapscript {</span></b></p>

<p class="MsoNormal" style="text-indent: 36pt;"><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">&nbsp;public</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">
 </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">static</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">
void</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> main(String[]
args) {</span></p>

<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;….</span></p>



<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp; String mappath= </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">
new</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;C:\\ms4w\\apps\\e-rescue\\&quot;
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>



<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp; mapObj map = </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">
new</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> mapObj(mappath.concat(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;
emergency2.map&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">));</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style=""></span>&nbsp; imageObj image = map.draw();</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">
</span></p>

<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style=""></span>&nbsp; String image_url = </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">
&quot;C:\\ms4w\\tmp\\ms_tmp\\emergency.png&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span>
</p>



<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style=""></span>image.save(image_url, map);</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">
</span></p><p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">…</span></p>

<p class="MsoNormal" style="text-indent: 36pt;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;}</span></p>



<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;}</span></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">I get the
following error:</span></b></p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">Exception in
thread &quot;main&quot; java.lang.UnsatisfiedLinkError: C:\Program
Files\Java\jre1.6.0_01\bin\mapscript.dll: Can&#39;t find dependent libraries</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at
java.lang.ClassLoader$NativeLibrary.load(</span><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">Native Method</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">
)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at
java.lang.ClassLoader.loadLibrary0(Unknown Source)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at java.lang.ClassLoader.loadLibrary(Unknown
Source)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at java.lang.Runtime.loadLibrary0(Unknown
Source)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at java.lang.System.loadLibrary(Unknown
Source)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at
edu.umn.gis.mapscript.mapscriptJNI.&lt;clinit&gt;(</span><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">mapscriptJNI.java:23</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">
)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at edu.umn.gis.mapscript.mapObj.&lt;init&gt;(</span><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">
mapObj.java:276</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at ProvaMapscript.main(</span><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">
ProvaMapscript.java:51</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">)</span></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">I don't know
exactly which libraries mapscript.dll requires but as far as I could see from some
forum the following list of dll's <span style="">&nbsp;</span>is
needed:</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">bgd.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">gdal14.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">geotiff.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">iconv.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">kernel32.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libcurl.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libecwj2.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libmap.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libmysql.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libpq.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libproj.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">libtiff.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">mapscript.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">msvcr71.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">msvcrt.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">ntdll.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">pdflib.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">proj.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">xerces-c_2_7.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">zlib1.dll</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">dwmapi.dll</span></b></p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">I have them
in the directory "C:\ms4w\Apache\cgi-bin" and this directory is in the system
environment variable PATH. </span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">&nbsp;</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">I don't know
exactly which is the problem. I'm thinking to 2 things:</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">1- As far as
I can understand there is a library, namely sde91.dll, that is needed by
libmap.dll. I can't <span style="">&nbsp;&nbsp;&nbsp;</span>find this library
in my system. Is there anybody who knows where I can download this library? (but
I think I don't need it since I'm not using ESRI&#39;s ArcSDE)</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">2- Is it
possible that my Java Mapscript files are not compatible with my JDK version 1.6.0?
I say it because I read in the README_INSTALL.txt of MS4W the following:</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">MapScript</span></b></p>

<p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">…</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">Java MapScript:
compiled against Java 1.5.07</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">…</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">If anybody could
help me in this problem I would be infinitely grateful!!</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">Thank you in
advance,</span></b></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: rgb(127, 0, 85);">Gaia</span></b></p>