[UMN MAPSERVER-USERS] JavaMapScript
Roger Bixby
roger at ROGERBIXBY.COM
Tue Nov 15 09:56:01 PST 2005
I did that before I sent the original email. Same result. The examples
below are from after I moved the map file from it's original location
to the same directory I was running the class from.
And to speed this up a bit, I'm running this on a Windows XP box. The
original location of the map file was
c:\tutorial\htdocs\example1-8.map. I tried the following combination of
path structures with the same result:
c:\\tutorial\\htdocs\\example1-8.map
\\tutorial\\htdocs\\example1-8.map
/tutorial/htdocs/example1-8.map
c:/tutorial/htdocs/example1-8.map
Any ideas?
Umberto Nicoletti <umberto.nicoletti at GMAIL.COM> wrote on 11/15/2005,
05:46:36 PM:
> Try referenceing the map file with the full path.
>
> Regards,
> Umberto
>
> On 11/15/05, Roger Bixby 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.(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.(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