JavaMapScript
Umberto Nicoletti
umberto.nicoletti at GMAIL.COM
Tue Nov 15 08:46:36 PST 2005
Try referenceing the map file with the full path.
Regards,
Umberto
On 11/15/05, Roger Bixby <roger at rogerbixby.com> wrote:
> Hi all,
>
> I'm trying to use the JavaMapScript package and have run into some difficulty.
> When I run the DrawMap test file included with the distribution I get two
> different errors.
>
> This first error I get when I reference a map file that is not in the same
> directory as the java class file:
>
> C:\eclipse\workspace\tekmaps\.deployables\tekmaps\WEB-INF\classes>java
> -Djava.library.path=c:/mapscript -cp
> .;c:/tekmaps/mapscript/debug/java/mapscript.jar DrawMap example1-8.map map.jpg
> Exception in thread "main" java.lang.UnknownError: No such file or directory
> at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
> at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:328)
> at DrawMap.main(DrawMap.java:34)
>
> The second is slightly different, but I suspect it's related to the first:
>
> If I put the map file, in this case example1-8.map in the classpath, I sometimes
> get a java IOException:
>
> C:\eclipse\workspace\tekmaps\.deployables\tekmaps\WEB-INF\classes>java
> -Djava.library.path=c:/mapscript -cp
> .;c:/tekmaps/mapscript/debug/java/mapscript.jar DrawMap example1-8.map map.jpg
> (example1-8.map)java.io.IOException: (example1-8.map)
> at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
> at edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:328)
> at DrawMap.main(DrawMap.java:34)
>
> I can't find any documentation on these errors at all. What little documentation
> I have been able to find is a couple of years old. Is there anyone out there now
> using Java MapScript who can steer me in the right direction with this?
>
> Thanks,
>
> Roger Bixby
>
More information about the MapServer-users
mailing list