Installing Java MapScript on Windows
Bas Vanmeulebrouk
bvanmeul at EBE.UCT.AC.ZA
Fri Jul 22 02:53:03 PDT 2005
Hi list,
I am trying to install Java MapScript on a Windows XP Professional machine.
I have downloaded a binary from http://hobu.stat.iastate.edu/mapserver/.
When I try to load the MapScript dll in my Java class, it causes the
following error: The procedure entry point CPLGetLastErrorMsg could not be
located in the dynamic link library gdal12.dll and then Exception in thread
"main" java.lang.UnsatisfiedLinkError: C:\Program
Files\MapServer\JavaMapScript\mapscript.dll: The specified procedure could
not be found.
I assume mapscript.dll can't find the additional dll's like gdal12.dll. I am
positive there is only one instance of these dll's on my machine. I have
tried to set the PATH environment variable and I have put all the dll's in
the same directory as my Java class, none of which seem to work. Does anyone
know how to solve this problem? I have read the instructions on
http://ms.gis.umn.edu/docs/howto/java_mapscript_Tomcat_55 and the MapServer
wiki, but these don't seem to help.
The binary also contains a mapserv.exe CGI executable and this one is
working fine, both mapserv.exe -v and when I invoke it through a webbrowser.
Kind regards,
Bas Vanmeulebrouk.
import java.io.IOException;
import edu.umn.gis.mapscript.*;
public class myFirstMapMain {
public static void main(String[] args) throws IOException {
mapObj map = new mapObj("c:\\temp\\test.map");
imageObj image = map.draw();
image.save("c:\\temp\\test.png", map);
}
}
More information about the MapServer-users
mailing list