private void addDirToClasspath(List<URL> urlList, File libDir) throws MalformedURLException {
    if (libDir.exists()) {
      File[] files = libDir.listFiles();
      if (files != null) {
        for (final File fileEntry : files) {
          if (!fileEntry.isDirectory()) {
            urlList.add(fileEntry.toURI().toURL());
          }
        }
      }
    }
  }
Add all the files in libDir to urlList ignoring directories.
@param urlList: the list to which all paths needs to be appended
@param libDir: the path of which all the files needs to be appended to urlList
ambari-server/src/main/java/org/apache/ambari/server/view/ViewExtractor.java