Hi, buddies<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am using gdal 1.7.1 with java banding, I got a problem when I run the follow code, there is no out put message. And I am sure the file exists, I have tried the relative code in c++, it works well. Any one knows why?<br>//ShpTest.java<br>import java.io.IOException;<br>import org.gdal.gdal.gdal;<br>import org.gdal.ogr.DataSource;<br>import org.gdal.ogr.ogr;<br>public class ShpTest {<br>&nbsp;&nbsp;&nbsp; public static void main(String args[]) throws IOException {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String filename="f:/test/shp/states.shp";<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gdal.AllRegister();&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DataSource poDS = ogr.Open(filename);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(poDS == null)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(gdal.GetLastErrorMsg());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.exit( 1 );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("test ok");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; poDS.delete();<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>}<br><br><br><span title="neteasefooter"/></span>