Java MapScript on windows

Gilbert, Antoine AGilbert at KOREM.COM
Tue Mar 27 13:42:48 EDT 2007


Ok, got it finally... Sorry for my annoying posts...

 

I added the environment variable PROJ_LIB and now I'm able to generate
the image from the map file.

 

 

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Gilbert, Antoine
Sent: Tuesday, March 27, 2007 11:18 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Java MapScript on windows

 

I added all the /ms4w/Apache/cgi-bin directory in my path environnement
and now it's working

 

Now I'm getting the error message : 

Exception in thread "main" java.lang.UnknownError:
msProcessProjection(): Projection library error. No such file or
directory

        at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)

        at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:276)

 

I'm just trying this tiny sample code :

mapObj mapa=new
mapObj("C:/ms4w/apps/chameleon/samples/map/world_wms.map");

imageObj imagen=mapa.draw();

imagen.save("c:/test.png", mapa);

 

 

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Gilbert, Antoine
Sent: Tuesday, March 27, 2007 9:41 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Java MapScript on windows

 

Hi

 

I'm new to MapServer. I have installed the windows version and some
samples and this is working.

 

Now what I am trying is to use Java MapScript.

 

I made a Java test application (not a Web one) using mapscript.jar and
mapscript.dll coming from \ms4w\Apache\cgi-bin\mapscript\java

 

I m getting this error message :

 

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program
Files\Java\jdk1.5.0_09\jre\bin\mapscript.dll: Can't find dependent
libraries

        at java.lang.ClassLoader$NativeLibrary.load(Native Method)

        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)

        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)

        at java.lang.Runtime.loadLibrary0(Runtime.java:822)

        at java.lang.System.loadLibrary(System.java:993)

        at
edu.umn.gis.mapscript.mapscriptJNI.<clinit>(mapscriptJNI.java:23)

        at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:276)

        at testjavamapscript.Main.main(Main.java:31)

 

Any ideas ?

 

It's very difficult for me to find documentation and examples about Java
mapscript. If anyone can provide me with some URLs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070327/9fba0f75/attachment.html


More information about the mapserver-users mailing list