"sarah" wrote in message <jpkhcb$q77$
1...@newscl01ah.mathworks.com>...
Which other functions have you tried? Do any of those functions open files, as does shaperead?
The error you received is issued if the MATLAB fopen function fails to open an SHP file; Mapping Toolbox is just checking the return value from fopen and reporting the problem.
Note that when you run shaperead from within MATLAB, you can ask it to open boston_roads.shp without providing any path information, because this SHP file is in a folder that is on the path by default. I'd be surprised if things work like this when calling shaperead or fopen from within Java. I'm not absolutely certain, but I'd expect that you'd have to provide at least a relative path, if not a fully qualified path. Try adding explicit path information, and see if that resolves your problem.
Rob Comer
Mapping Toolbox Development
MathWorks