Eclipse MapServer libmapscript.so: cannot open shared object file

Ryan Ollerenshaw ollerery at ENGR.ORST.EDU
Wed Jul 19 09:21:52 PDT 2006


Quoting Ryan Ollerenshaw <ollerery at engr.orst.edu>:

> When trying to create a java application using eclipse i get the following
> error:
>
> java.lang.UnsatisfiedLinkError: libmapscript: libmapscript.so: cannot open
> shared object file: No such file or directory

I have the library libmapscript.so saved at /home/ryan/workspace/mapscript_test

and I have tried setting my LD_LIBRARY_PATH using:
export LD_LIBRARY_PATH=/home/ryan/workspace/mapscript_test

But no luck, I have also tried adding the following to eclipse program
arguments:
-Djava.library.path=/home/ryan/workspace/mapscript_test/

But still no luck.  Sorry i am new to eclipse to any help would be great.

> Here is my code:
>
> import  edu.umn.gis.mapscript.*;
> import java.io.*;
>
> public class HelloServlet {
>
> 	public static void main(String[] args) {
>
> 	System.loadLibrary("mapscript");
> 	      mapObj  map;
> 	      imageObj image;
>
> 	      map=new mapObj("/var/www/html/mapserver/htdocs/display.map");
> 	      map.setProjection("init=epsg:4326");
> 	      image=map.draw();
> 	      image.save("test.png",map);
>     }
> }
>
>
>



More information about the MapServer-users mailing list