Changes between Version 4 and Version 5 of GdalOgrInJavaBuildInstructions
- Timestamp:
- Jan 30, 2011, 12:00:51 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GdalOgrInJavaBuildInstructions
v4 v5 17 17 18 18 19 == Apache Ant ==19 == Install Apache Ant == 20 20 21 21 [http://ant.apache.org/bindownload.cgi] 22 22 23 23 Binary distributions are available, so compiling isn't necessary. 24 25 ''I don't think ANT is really needed, perhaps remove this step...''26 24 27 25 == Set up environment variables == … … 33 31 c. Do the same for PATH. Ensure that "''<java-dir>''\bin" and "''<ant-dir>''\bin" are included in PATH. 34 32 35 == Compile GDAL ==33 == Download and Configure GDAL == 36 34 37 35 [http://trac.osgeo.org/gdal/wiki/DownloadSource] 38 36 39 Adjust the SWIG macro in <''gdal-dir''>\nmake.opt to point to C:\OSGeo4W\apps\swigwin\swig.exe if using the OSGeo4W provided version of swig. 40 41 Otherwise build GDAL normally. 42 43 == Configure Swig Bindings == 44 45 In ''<gdal-dir>''\swig\java, edit the java.opt file pointing it to your correct JDK location. Also update the JAVA_INCLUDE to reference the win32 directory. 37 Follow normal steps to configure GDAL by modifying <''gdal-dir''>\nmake.opt. In addition to normal steps ensure that the SWIG, JAVA and ANT related definitions are set appropriately. Perhaps something like: 46 38 47 39 {{{ … … 52 44 JAR=$(JAVA_HOME)/bin/jar 53 45 JAVA_INCLUDE=-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32 46 47 ANT_HOME=C:\apache-ant-1.8.2 48 49 SWIG=C:\OSGeo4W\apps\swigwin\swig.exe 54 50 }}} 55 51 56 c. In ''<gdal-dir>''\swig, run "nmake -f makefile.vc java". 52 == Compile GDAL == 53 54 See BuildingOnWindows for details on configuring and building GDAL on windows. 55 56 {{{ 57 nmake /f makefile.vc 58 }}} 59 60 == Build Java Bindings == 61 62 This step will run SWIG to generate the Java bindings, use nmake/cl.exe to build the C++ side of the Java bindings and ANT/javac to compile the java side of the bindings. 63 64 {{ 65 cd swig 66 nmake /f makefile.vc java 67 }}} 68 69 == Install components == 70 71 57 72 58 73 d. Move the following files from ''<gdal-dir>''\swig\java to ''<gdal-dir>''\swig\java\apps: