static

in src/main/java/com/hadoop/compression/lzo/GPLNativeCodeLoader.java [44:66]


  static {
    try {
      //try to load the lib
      if (!useBinariesOnLibPath()) {
        File unpackedFile = unpackBinaries();
        if (unpackedFile != null) { // the file was successfully unpacked
          String path = unpackedFile.getAbsolutePath();
          System.load(path);
          LOG.info("Loaded native gpl library from the embedded binaries");
        } else { // fall back
          System.loadLibrary(LIBRARY_NAME);
          LOG.info("Loaded native gpl library from the library path");
        }
      } else {
        System.loadLibrary(LIBRARY_NAME);
        LOG.info("Loaded native gpl library from the library path");
      }
      nativeLibraryLoaded = true;
    } catch (Throwable t) {
      LOG.error("Could not load native gpl library", t);
      nativeLibraryLoaded = false;
    }
  }