Java mapscript in Windows

Jan Zich jzich at EMORY.EDU
Mon Jul 17 16:59:19 PDT 2006


Hello,

I'm a beginner to MapServer and I'm struggling with MapScript Java API 
in Windows. There seems to be something wrong with the naming of 
functions in mapscript.dll and edu.umn.gis.mapscript.mapscriptJNI. It 
seems that some functions are mapped correctly to their C equivalents, 
but some not. For instance, the static method

   edu.umn.gis.mapscript.mapscriptJNI.set_layerObj_name

should be mapped to (is that right?)

   Java_edu_umn_gis_mapscript_mapscriptJNI_set_1layerObj_1name.

But there is no such function in mapscript.dll. Instead there is

   _Java_edu_umn_gis_mapscript_mapscriptJNI_layerObj_1name_1set

And, indeed, I get an exception

   java.lang.UnsatisfiedLinkError: set_layerObj_name

On the other hand, mapscript_wrap.c seems to be correct since there is

   Java_edu_umn_gis_mapscript_mapscriptJNI_set_1layerObj_1name

Also, some methods seem to work. For instance, the following piece of 
code works:

   System.loadLibrary("mapscript");
   mapObj map = new mapObj("test.map");
   imageObj img = map.draw();
   img.save("test.gif", map);

Is it possible that some files of some older version of MapScript were 
mixed with a newer version?

Thank you
Jan



More information about the MapServer-users mailing list