问题
I want to use ogr2ogr.java and it need the GDAL jni to work. I have tried following the instruction mentioned here Build Instructions for GDAL/OGR In Java (Windows) but, still I am not able to build it. I am using windows 7 64 bit operating system. If somebody has build it successfully let me know how you did it.
回答1:
So, after lot of trouble I found out that that there is no need to build gdal jni from source.
- You can download the compiled jni dll file from here Tamas Szekeres' Windows daily builds. Make sure you download a stable release. zip package release-1600-x64-gdal-1-8-0-mapserver-5-6-6 worked for me. you can can try it too unless you want a very specific version.
- Once the gdaljni.dll file was in place I got the ogr2ogr.java file from here All Java sample programs
- Make sure you check this post to set the environment variables correctly
来源:https://stackoverflow.com/questions/50753253/how-to-build-gdal-jni-on-windows