[SPAM] - [UMN_MAPSERVER-USERS] javaMapscript compilation - Sending mail server found on relays.ordb.org

Stéphane RIFF stephane.riff at CERENE.FR
Thu Aug 19 08:39:45 PDT 2004


Forget this post i finally get javaMapscript to work.

The problem came from the classpath, java cannot find mapscript.jar at
execution time
@+

Stéphane RIFF wrote:

> 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