[Mapserver-users] Java Mapscript example
Jim Buzbee
James.P.Buzbee at lmco.com
Thu Dec 18 12:36:03 PST 2003
I'm new to this too, but don't you have to call :
System.loadLibrary("mapscript");
Before your new mapObj call?
Your program worked for me after I added explicit load.
Jim
Eduardo Spremolla wrote:
> Hi every budy.
>
> I compiled java mapscript successfully in a RH9 box with j2sdk1.4.1_02
> Then I put libmapscript.so in /usr/local/lib, run ldconfig and test this
> code:
>
> import java.io.*;
> import edu.umn.gis.mapscript.*;
>
> public class Test {
> public static void main(String[] args) throws IOException {
>
> mapObj mapa;
> imageObj imagen;
>
> mapa=new mapObj("uru2.map");
> imagen=mapa.draw();
> imagen.save("uruguay_java.png");
>
> }
> }
>
> but got:
> [lalo at fly mvd]$ java -cp .:mapscript.jar Test
> Exception in thread "main" java.lang.UnsatisfiedLinkError: new_mapObj
> at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
> at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:296)
> at Test.main(Test.java:10)
>
> What's wrong?
>
> Thanks in advance
>
>
>
More information about the MapServer-users
mailing list