[ms4w-users] Problems in testing Java Mapscript

Gaia Trecarichi gaia.trecarichi at gmail.com
Fri Jun 1 11:41:29 EDT 2007


* *

*I'm new in mapserver stuff and I'm trying to use Java Mapscript without any

* *

*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:*






















*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:*



*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,*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20070601/21809543/attachment.html

More information about the ms4w-users mailing list