code: public static void loadFirstAvailable(ClassLoader loader, String... names) {
          List<Throwable> suppressed = new ArrayList<Throwable>();
          for (String name : names) {
              try {
                  load(name, loader);
                  return;
              } catch (Throwable t) {
                  suppressed.add(t);
                  logger.debug("Unable to load the library '{}', trying next name...", name, t);
              }
          }
          IllegalArgumentException iae =
                  new IllegalArgumentException("Failed to load any of the given libraries: " + Arrays.toString(names));
          ThrowableUtil.addSuppressedAndClear(iae, suppressed);
          throw iae;
      }
docs: Loads the first available library in the collection with the specified
  {@link ClassLoader}.
  
  @throws IllegalArgumentException
  if none of the given libraries load successfully.