Problems in testing Java Mapscript
Gaia Trecarichi
gaia.trecarichi at GMAIL.COM
Mon Jun 4 09:24:41 PDT 2007
*Hello,*
*I'm new in mapserver stuff and I'm trying to use Java Mapscript without any
success.*
*My environment is:*
- *Windows XP*
- * MS4W version 4.10.1.*
- *JDK 1.6.0_01*
- * Eclipse *
*
I wanted to test some Java Mapscript functionality with a simple Java
program whose code is the following:*
* -----------------------------------------------------------------------*
* …*
*import edu.umn.gis.mapscript.*;*
* public class ProvaMapscript {*
* public* *static* * void* main(String[] args) {
….
String mappath= * new* String("C:\\ms4w\\apps\\e-rescue\\" );
mapObj map = * new* mapObj(mappath.concat(" emergency2.map"));
imageObj image = map.draw();
String image_url = "C:\\ms4w\\tmp\\ms_tmp\\emergency.png";
image.save(image_url, map);
…
}
}
*I get the following error:*
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program
Files\Java\jre1.6.0_01\bin\mapscript.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(*Native Method* )
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at edu.umn.gis.mapscript.mapscriptJNI.<clinit>(*mapscriptJNI.java:23*)
at edu.umn.gis.mapscript.mapObj.<init>(* mapObj.java:276*)
at ProvaMapscript.main(* ProvaMapscript.java:51*)
*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 is needed:*
*bgd.dll*
*gdal14.dll*
*geotiff.dll*
*iconv.dll*
*kernel32.dll*
*libcurl.dll*
*libecwj2.dll*
*libmap.dll*
*libmysql.dll*
*libpq.dll*
*libproj.dll*
*libtiff.dll*
*mapscript.dll*
*msvcr71.dll*
*msvcrt.dll*
*ntdll.dll*
*pdflib.dll*
*proj.dll*
*xerces-c_2_7.dll*
*zlib1.dll*
*dwmapi.dll*
*I have them in the directory "C:\ms4w\Apache\cgi-bin" and this directory is
in the system environment variable PATH. *
* *
*I don't know exactly which is the problem. I'm thinking to 2 things:*
*1- As far as I can understand there is a library, namely sde91.dll, that is
needed by libmap.dll. I can't 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's ArcSDE)*
*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:*
*MapScript*
*…*
*Java MapScript: compiled against Java 1.5.07*
*…*
*If anybody could help me in this problem I would be infinitely grateful!!*
*Thank you in advance,*
*Gaia*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070604/d05fa48b/attachment.htm>
More information about the MapServer-users
mailing list