public static void mergeTypeClassPaths(
      List<String> destinationPaths, final List<String> sourcePaths, final String rootPath) {
    if (sourcePaths != null) {
      for (String jar : sourcePaths) {
        File file = new File(jar);
        if (!file.isAbsolute()) {
          file = new File(rootPath + File.separatorChar + jar);
        }

        String path = file.getAbsolutePath();
        if (!destinationPaths.contains(path)) {
          destinationPaths.add(path);
        }
      }
    }
  }
public static void mergeTypeClassPaths ( List < String > destinationPaths , final List < String > sourcePaths , final String rootPath ) { if ( sourcePaths != null ) { for ( String jar : sourcePaths ) { File file = new File ( jar ) ; if ( ! file . isAbsolute ( ) ) { file = new File ( rootPath + File . separatorChar + jar ) ; } String path = file . getAbsolutePath ( ) ; if ( ! destinationPaths . contains ( path ) ) { destinationPaths . add ( path ) ; } } } }
Merge the absolute paths of source paths into the list of destination paths

@param destinationPaths the path list which the source paths will be merged into
@param sourcePaths source paths
@param rootPath defined root path for source paths when they are not absolute path