javaMapscript compilation

Stéphane RIFF stephane.riff at CERENE.FR
Wed Aug 18 08:44:49 EDT 2004


Hello,

I try to compile javaMapscript, i followed the instruction on yhe
WikkiMapserver but i can't get it work.

First, when i want to run make in the "mapscript/java" directory, the
"Makefile" ask for mapscript.i and mapscript_wrap.c
which are in "mapscript" directory... So i copy them in "java" but is it
a good solution ???

If we forgot this error :) , ican get mapscipt.jar and libmapscript.so.
But when i try to execute the test program it complain about new_mapObj,
here is the error :

Exception in threa "main" java.lang.UnsatifiedLinkError: new_mapObj
          at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
          at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:330)
          at myFirstMap.main(myFirstMap.java:11)

Here is the java program :

 import java.io.*;
 import edu.umn.gis.mapscript.*;

 public class myFirstMap {

   public static void main(String[] args) throws IOException {
      System.loadLibrary("mapscript");
      mapObj  map;
      imageObj image;

      map=new mapObj("mapfile.map");
      image=mapa.draw();
      image.save("yuhuu.png",map);
   }
 }

If someone could help me, i can't find out what is going wrong.
Thanks



More information about the mapserver-users mailing list