/****************************************************************************** * $Id: gdalconst_java.i 9183 2006-02-16 17:21:12Z collinsb $ * * Name: gdalconst_java.i * Project: GDAL SWIG Interface * Purpose: Typemaps for Java bindings * Author: Benjamin Collins, The MITRE Corporation * * * $Log$ * Revision 1.2 2006/02/16 17:21:12 collinsb * Updates to Java bindings to keep the code from halting execution if the native libraries cannot be found. * * Revision 1.1 2006/02/02 20:56:07 collinsb * Added Java specific typemap code * * */ %pragma(java) jniclasscode=%{ private static boolean available = false; static { try { System.loadLibrary("gdalconstjni"); available = true; } catch (UnsatisfiedLinkError e) { available = false; System.err.println("Native library load failed."); System.err.println(e); } } public static boolean isAvailable() { return available; } %} %include typemaps_java.i