code: private Throwable loadSystemLib(String _libName) {
          // system library could have different name then the real lib (e.g. instead of 'libsomething.so' it could be called 'something')
          List<String> possibleNames = new ArrayList<>();
          String fileExtension = getFileExtension(_libName);
  
          String fileWithoutExt = null;
  
          if (fileExtension != null && !fileExtension.isEmpty()) {
              fileWithoutExt = _libName.replace("." + fileExtension, "");
              possibleNames.add(_libName.replace("." + fileExtension, "")); // 'libsomething'
          }
          if (_libName.startsWith("lib")) { // most librarys on *nix systems start with 'lib'
              if (fileWithoutExt != null) {
                  possibleNames.add(fileWithoutExt.replaceFirst("^lib", "")); // 'something'
              }
              possibleNames.add(_libName.replaceFirst("^lib", "")); // 'something.so'
          }
  
          Throwable lastError = null;
          for (String name : possibleNames) {
              try {
                  System.loadLibrary(name);
                  return null; // if no exception has been thrown, loading has succedded, so we are done here
              } catch (Throwable _ex) {
                  lastError = _ex;
              }
          }
         return lastError; // if we reach this, no system library was found
      }
docs: Tries to load a library using System.loadLibrary.
  This will also build different filename combinations based on the given filename
  (without prefix like 'lib' and without suffix like '.so' or '.dll')
  @param _libName library
  @return null on success, {@link Throwable} otherwise