<br><font size=2 face="Arial">Hi</font>
<br>
<br><font size=2 face="Arial">I think you should add the directory, which
contains the DLL-files, to your PATH-Environment-Variable.</font>
<br>
<br><font size=2 face="Arial">>set PATH=.\TestUML\;%PATH%</font>
<br><font size=2 face="Arial">>java -classpath .\;.\mapscript.jar -Djava.library.path=.\TestUML\
DemoMain</font>
<br>
<br><font size=2 face="Arial">Benedikt</font>
<br>
<br><font size=2 face="Arial">UMN MapServer Users List <MAPSERVER-USERS@LISTS.UMN.EDU>
schrieb am 04.12.2006 12:50:21:<br>
<br>
> Dear friends,<br>
> I am trying to run a simple demo of MapServer using Java<br>
> on a Windows XP Professional operating system, but unsuccesfully.<br>
> <br>
> Is anyone working on this system and using java with MapServer,<br>
> or knowing of any issue I should work around before going ahead?<br>
> Below are some of the details of my test, but please ask if I missed<br>
> something could be usefull.<br>
> <br>
> Thank you for any help,<br>
> Francesco.<br>
> <br>
> =============================================<br>
> I am using the package "ms4w_1.5.1.zip".<br>
> <br>
> The demo program is very basic:<br>
> <br>
> import edu.umn.gis.mapscript.mapObj;<br>
> public class DemoMain {<br>
> private mapObj _map = null;<br>
> public DemoMain() {<br>
> try {<br>
> String mapFile = "tutor.map";<br>
> _map = new mapObj(mapFile);<br>
> }<br>
> catch (Throwable ex) {<br>
> ex.printStackTrace();<br>
> }<br>
> }<br>
> public static void main(String[] args) {<br>
> try {<br>
> DemoMain test = new DemoMain();<br>
> } catch (Throwable ex) {<br>
> ex.printStackTrace();<br>
> }<br>
> }<br>
> }<br>
> <br>
> Now I compiled it succesfully, then I copied the "dll" files
I identified<br>
> as necessary starting from mapscript.dll (using "depender.exe")
in the<br>
> "TestUML" subdirectory and then run the program.<br>
> The files in TestUML are:<br>
> -) bgd.dll<br>
> -) gdal13.dll<br>
> -) geotiff.dll<br>
> -) iconv.dll<br>
> -) libcurl.dll<br>
> -) libecwj2.dll<br>
> -) libmap.dll<br>
> -) libmysql.dll<br>
> -) libpg.dll<br>
> -) libtiff.dll<br>
> -) mapscript.dll<br>
> -) pdflib.dll<br>
> -) proj.dll<br>
> -) xerces-c_2_7.dll<br>
> -) zlib1.dll<br>
> <br>
> The command line to run the program is:<br>
> >java -classpath .\;.\mapscript.jar -Djava.library.path=.\TestUML\
DemoMain<br>
> <br>
> The result was:<br>
> 1) An error window reporting that "bgd.dll" was not found<br>
> 2) the following lines after the command line:<br>
> java.lang.UnsatisfiedLinkError: C:\Demo\TestUML\mapscript.dll: Can't
find<br>
> dependent libraries<br>
> at java.lang.ClassLoader$NativeLibrary.load(Native
Method)<br>
> at java.lang.ClassLoader.loadLibrary0(Unknown
Source)<br>
> at java.lang.ClassLoader.loadLibrary(Unknown
Source)<br>
> at java.lang.Runtime.loadLibrary0(Unknown
Source)<br>
> at java.lang.System.loadLibrary(Unknown
Source)<br>
> at edu.umn.gis.mapscript.mapscriptJNI.<clinit>(mapscriptJNI.java:22)<br>
> at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:312)<br>
> at DemoMain.<init>(DemoMain.java:9)<br>
> at DemoMain.main(DemoMain.java:20)<br>
> <br>
> Thank you again for your time,<br>
> Francesco.<br>
</font>