bootstrap/src/main/java/com/streamsets/pipeline/SDCClassLoader.java
static List<URL> bringStageAndProtoLibsToFront(String stageLibName, List<URL> urls) {
    List<URL> otherJars = new ArrayList<>();
    List<URL> protolibJars = new ArrayList<>();
    List<URL> stageLibjars = new ArrayList<>();
    for (URL url : urls) {
      String str = url.toExternalForm();
      if (str.endsWith(".jar")) {
        int nameIdx = str.lastIndexOf("/");
        if (nameIdx > -1) {
          String jarName = str.substring(nameIdx + 1);
          if (jarName.contains("-protolib-")) {
            // adding only protolib jars
            protolibJars.add(url);
          } else if (jarName.contains(stageLibName)) {
            stageLibjars.add(url);
          } else {
            otherJars.add(url);
          }
        } else {
          otherJars.add(url);
        }
      } else {
        otherJars.add(url);
      }
    }
    List<URL> allJars = new ArrayList<>();
    if (stageLibjars.size() != 1) {
      throw new ExceptionInInitializerError("Expected exactly 1 stage lib jar but found " + stageLibjars.size() +
          " with name " + stageLibName);
    }
    allJars.addAll(stageLibjars);
    allJars.addAll(protolibJars);
    allJars.addAll(otherJars);
    return allJars;
  }
static List<URL> bringStageAndProtoLibsToFront(String stageLibName, List<URL> urls) {
    List<URL> otherJars = new ArrayList<>();
    List<URL> protolibJars = new ArrayList<>();
    List<URL> stageLibjars = new ArrayList<>();
    for (URL url : urls) {
      String str = url.toExternalForm();
      if (str.endsWith(".jar")) {
        int nameIdx = str.lastIndexOf("/");
        if (nameIdx > -1) {
          String jarName = str.substring(nameIdx + 1);
          if (jarName.contains("-protolib-")) {
            // adding only protolib jars
            protolibJars.add(url);
          } else if (jarName.contains(stageLibName)) {
            stageLibjars.add(url);
          } else {
            otherJars.add(url);
          }
        } else {
          otherJars.add(url);
        }
      } else {
        otherJars.add(url);
      }
    }
    List<URL> allJars = new ArrayList<>();
    if (stageLibjars.size() != 1) {
      throw new ExceptionInInitializerError("Expected exactly 1 stage lib jar but found " + stageLibjars.size() +
          " with name " + stageLibName);
    }
    allJars.addAll(stageLibjars);
    allJars.addAll(protolibJars);
    allJars.addAll(otherJars);
    return allJars;
  }
Arranges the urls in the following order:
<ul>
<li>stage lib jars</li>
<li>protolib jars</li>
<li>non protolib jars</li>
</ul>

@param stageLibName
@param urls
@return