[SPAM] - [UMN_MAPSERVER-USERS] javaMapscript compilation - Sending mail server found on relays.ordb.org
Stéphane RIFF
stephane.riff at CERENE.FR
Mon Sep 13 02:13:18 PDT 2004
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
>
After some test i finally get it to work but i have to copy
"mapscript.jar" in the "/usr/local/lib" directory where
"libmapscript.so" stand.
Is it normal, i don't think it is??
Even with setting LD_LIBRARY_PATH to /usr/local/lib
And run with java -cp mapscript.jar
It doesn't work, i've got an unsatisfiedLinkError: new_mapObj ........
So i'd like to know if someone could show me the command he used to
start his javaMapscript program and his config
Thanks
More information about the MapServer-users
mailing list