[Mapserver-users] Java Mapscript example

Eduardo Spremolla edspremolla at Antel.com.uy
Thu Dec 18 05:31:52 PST 2003


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



-- 
Eduardo Spremolla <edspremolla at antel.com.uy>
Antel I+D




More information about the MapServer-users mailing list