| 23 | == Run the java build == |
| 24 | |
| 25 | Do a "make" in gdal/swig/java. |
| 26 | |
| 27 | You should see a bunch of stuff, possible ending with this: |
| 28 | |
| 29 | {{{ |
| 30 | cp ./.libs/*.so ./ |
| 31 | cp: cannot stat `./.libs/*.so': No such file or directory |
| 32 | make: [build] Error 1 (ignored) |
| 33 | ant |
| 34 | Buildfile: build.xml |
| 35 | |
| 36 | compile: |
| 37 | [javac] Compiling 33 source files to /wrk/home/warmerda/wrk/gdal-1.5.2/swig/java/build/classes |
| 38 | [echo] compilation complete |
| 39 | |
| 40 | archive: |
| 41 | [jar] Building jar: /wrk/home/warmerda/wrk/gdal-1.5.2/swig/java/gdal.jar |
| 42 | |
| 43 | BUILD SUCCESSFUL |
| 44 | Total time: 2 seconds |
| 45 | }}} |
| 46 | |
| 47 | Don't worry about the ./.libs/*.so error. That appears to be something that would apply with libtool builds. |
| 48 | |
| 49 | == Running something == |
| 50 | |
| 51 | While still in gdal/swig/java try: |
| 52 | |
| 53 | {{{ |
| 54 | javac apps/gdalinfo.java |
| 55 | setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:`pwd` |
| 56 | java -classpath `pwd`/gdal.jar:`pwd`:`pwd`/apps gdalinfo |
| 57 | }}} |
| 58 | |
| 59 | With luck you will see the gdalinfo usage message. |
| 60 | |
| 61 | To deploy you need gdal.jar in your class path, and the four .so files (libgdalconstjni.so, libgdaljni.so, libogrjni.so and libosrjni.so) in your shared library path. |
| 62 | |