[Mapserver-users] Java Mapscript example
Jim Buzbee
James.P.Buzbee@lmco.com
Thu, 18 Dec 2003 13:36:03 -0700
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@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
>
>
>
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users