[mapserver-dev] Java MapScript DLL Name on Windows

Tamas Szekeres szekerest at gmail.com
Fri Apr 25 07:47:48 EDT 2008


Frank,

It seems most of the java examples are trying to load the
mapscript.dll explicitly, so you have to remove these code fragmens
from the examples, since the dll is already loaded by a common code.

try
	{
	  System.loadLibrary("mapscript");
	}
	catch(UnsatisfiedLinkError ule)
	{
	  System.err.println(ule);
	  System.exit(-1);
	}

And you'd have to do the renaming in the linux builds in parallel so
as not to break the things too much.

I'll take care of the C# part in this regard, but I'll have to use a
different naming convention since mapscript_wrap.dll already reserved
as the C# assembly name. Maybe the module name should also have to be
modified like "csmapscript" would be sufficient for this purpose. This
would result in the following library file names on different
platforms:

csmapscript.dll  - Windows
libcsmapscript.so - Linux
libcsmapscript.dylib - OSX


Best regards,

Tamas



2008/4/25, Frank Warmerdam <warmerdam at pobox.com>:
> Folks,
>
>  Who is the Java MapScript maintainer?  Umberto?
>
>  I'm trying to build a Java MapScript package for OSGeo4W, and I am
> concerned
>  about calling the support DLL "mapscript.dll" since this seems likely to
>  conflict with support DLLs for other languages (Python? C#? Perl?)
>
>  I tried modifying javamodule.i to have:
>
>  %pragma(java) jniclasscode=%{
>     static {
>         String  library = System.getProperty("mapserver.library.name",
> "mapscri\
>  pt_java");
>
>         System.loadLibrary(library);
>         /* TODO Throw when return value not MS_SUCCESS? */
>         edu.umn.gis.mapscript.mapscript.msSetup();
>     }
>  %}
>
>  While this builds, when I go to run Java code I still get:
>
> C:\build\mapserver-buildkit\mapserver-5.0.2\mapscript\java\release\apps\mapserve
>  r\java>java -classpath ..\..\..\lib\mapscript.jar;. ShapeInfo
> n:\data\esri\shape\eg_data\polygon.shp
> n:\data\esri\shape\eg_data\polygon.dbf
>  java.lang.UnsatisfiedLinkError: no mapscript in java.library.path
>
> C:\build\mapserver-buildkit\mapserver-5.0.2\mapscript\java\release\apps\mapserve
>  r\java>
>
>  Note that this does not refer to mapscript_java.dll or mapscript_java?
>
>  Any thoughts?  Do any of the other bindings produce mapscript.dll that
>  could conflict with the Java one?
>
>  Best regards,
>  --
> ---------------------------------------+--------------------------------------
>  I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
>  light and sound - activate the windows | http://pobox.com/~warmerdam
>  and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>  _______________________________________________
>  mapserver-dev mailing list
>  mapserver-dev at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


More information about the mapserver-dev mailing list