private synchronized static void loadNativeLibrary ( ) { if ( ! isLoaded ) { try { nativeLibFile = findNativeLibrary ( ) ; if ( nativeLibFile != null ) { // Load extracted or specified snappyjava native library. System . load ( nativeLibFile . getAbsolutePath ( ) ) ; } else { // Load preinstalled snappyjava (in the path -Djava.library.path) System . loadLibrary ( "snappyjava" ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; throw new SnappyError ( SnappyErrorCode . FAILED_TO_LOAD_NATIVE_LIBRARY , e . getMessage ( ) ) ; } isLoaded = true ; } }
Load a native library of snappy - java