Extends the runtime classpath to include the files or directories specified.
@param paths one or more strings representing a single JAR file or a directory containing JARs.
@since 1.0.0
341923
public void expandClasspath(String... paths) {
        if (paths == null || paths.length == 0) {
            return;
        }
        for (String path: paths) {
            expandClasspath(new File(PathUtil.resolve(path)));
        }
    }
1022497
private void addExtraPluginDependenciesToClasspath(Set<URL> path) throws MojoExecutionException {
        if (extraPluginDependencyArtifactId == null && extendedPluginDependencyArtifactId == null) {
            return;
        }

        try {
            Set<Artifact> artifacts = new HashSet<Artifact>(this.pluginDependencies);
            for (Artifact artifact : artifacts) {
                // must
                if (artifact.getArtifactId().equals(extraPluginDependencyArtifactId)
                    || artifact.getArtifactId().equals(extendedPluginDependencyArtifactId)) {
                    getLog().debug("Adding extra plugin dependency artifact: " + artifact.getArtifactId()
                        + " to classpath");
                    path.add(artifact.getFile().toURI().toURL());

                    // add the transient dependencies of this artifact
                    Set<Artifact> deps = resolveExecutableDependencies(artifact, true);
                    if (deps != null) {
                        for (Artifact dep : deps) {
                            getLog().debug("Adding extra plugin dependency artifact: " + dep.getArtifactId()
                                + " to classpath");
                            path.add(dep.getFile().toURI().toURL());
                        }
                    }
                }
            }
        } catch (MalformedURLException e) {
            throw new MojoExecutionException("Error during setting up classpath", e);
        }
    }
562959
public static void addClassesInPackageByFile(String packageName, String packagePath, List<Class<?>> classes) throws ClassNotFoundException {
        File dir = new File(packagePath);
        if (!dir.exists() || !dir.isDirectory()) {
            return;
        }
        File[] files = dir.listFiles(file -> (file.isDirectory()) || (file.getName().endsWith(".class")));
        if (Checker.isNotNull(files)) {
            for (File file : files) {
                if (file.isDirectory()) {
                    addClassesInPackageByFile(packageName + "." + file.getName(), file.getAbsolutePath(), classes);
                } else {
                    String className = file.getName().substring(0, file.getName().length() - 6);
                    classes.add(Class.forName(packageName + '.' + className));
                }
            }
        }
    }
82011
public void addClassPath(String classpath)
  {
    char sep = CauchoUtil.getPathSeparatorChar();
    int head = 0;
    int tail = 0;
    while (head < classpath.length()) {
      tail = classpath.indexOf(sep, head);

      String segment = null;
      if (tail < 0) {
        segment = classpath.substring(head);
        head = classpath.length();
      }
      else {
        segment = classpath.substring(head, tail);
        head = tail + 1;
      }

      if (segment.equals(""))
        continue;
      else if (segment.endsWith(".jar") || segment.endsWith(".zip"))
        addMergePath(JarPath.create(VfsOld.lookup(segment)));
      else
        addMergePath(VfsOld.lookup(segment));
    }
  }
645174
public static ApplicationClassLoader createNormalApplicationClassLoader(ClassLoader parent, String... jarFilePaths){
        ApplicationClassLoader classLoader = new ApplicationClassLoader(parent, true);
        classLoader.addJarFiles(jarFilePaths);
        return classLoader;
    }
347910
public void setFilePaths(String... filePaths) {
		Path[] paths = new Path[filePaths.length];
		for (int i = 0; i < paths.length; i++) {
			paths[i] = new Path(filePaths[i]);
		}
		setFilePaths(paths);
	}
372184
private void addDirectoryClasses(final Path location, final Path subPath) {
        for (final File file : location.toFile().listFiles()) {
            if (file.isDirectory())
                addDirectoryClasses(location.resolve(file.getName()), subPath.resolve(file.getName()));
            else if (file.isFile() && file.getName().endsWith(".class")) {
                final String classFileName = subPath.resolve(file.getName()).toString();
                classes.add(toQualifiedClassName(classFileName));
            }
        }
    }
411534
private Set<String> initExcludedPathList(Set<String> paths) {
		Set<String> toExclude = new HashSet<>();
		if (null == paths)
			return toExclude;

		for (String path : paths) {
			path = PathNormalizer.asPath(path);
			toExclude.add(path);
		}
		return toExclude;
	}
1328652
private void handleAuxClassPathFromFile(String filePath) throws IOException {
        try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) {
            while (true) {
                String s = in.readLine();
                if (s == null) {
                    break;
                }
                project.addAuxClasspathEntry(s);
            }
        }
    }
64554
public ClientUserCodeDeploymentConfig setJarPaths(List<String> jarPaths) {
        isNotNull(jarPaths, "jarPaths");
        this.jarPaths.clear();
        this.jarPaths.addAll(jarPaths);
        return this;
    }
1328946
public final void addClassPathEntry (@Nullable final File path)
  {
    if (path != null)
      m_aClassPathEntries.add (path.getAbsolutePath ());
  }
880449
public void addJarsToIndex(final String folderPath) {

		logger.info("Starting adding jar files in " + folderPath);

		final CombinedTypeSolver typeSolver = new CombinedTypeSolver();
		typeSolver.add(new ReflectionTypeSolver());

		final AtomicLong count = new AtomicLong(0);

		try {
			Files.newDirectoryStream(Paths.get(folderPath), path -> path.toString().endsWith(".jar")).forEach((file) -> {
				try {
					typeSolver.add(new JarTypeSolver(new FileInputStream(file.toFile())));
					count.addAndGet(1L);

				} catch (IOException ex) {}
			}
215303
public  function addClassPath($path) {
        if(!is_array($path)) {
            $path = array($path);
        }
        foreach($path as $item) {
            $this->classPaths[] = $item;
        }
    }
16124
public static Filter<ArchivePath> excludePaths(final String... paths) {
        return getFilterInstance(IMPL_CLASS_NAME_EXCLUDE_PATHS, new Class<?>[] { String[].class },
            new Object[] { paths });
    }
895053
private void fillJars()
  {
    synchronized (_pathList) {
      _pathList.clear();
    //_jarList.clear();

      loadPaths(_pathList);
      
      Collections.sort(_pathList);

      for (PathImpl jar : _pathList) {
        addJar(jar);
      }
    }
  }
876157
public void setClasspath(Path classpath)
    {
        if (_classpath == null)
        {
            _classpath = classpath;
        }
        else
        {
            _classpath.append(classpath);
        }
        log("Verification classpath is "+ _classpath,
            Project.MSG_VERBOSE);
    }
1222439
private static boolean addJREPath(final File dir) {
        if (dir != null && !dir.getPath().isEmpty() && FileUtils.canRead(dir) && dir.isDirectory()) {
            final File[] dirFiles = dir.listFiles();
            if (dirFiles != null) {
                for (final File file : dirFiles) {
                    final String filePath = file.getPath();
                    if (filePath.endsWith(".jar")) {
                        final String jarPathResolved = FastPathResolver.resolve(FileUtils.CURR_DIR_PATH, filePath);
                        if (jarPathResolved.endsWith("/rt.jar")) {
                            RT_JARS.add(jarPathResolved);
                        } else {
                            JRE_LIB_OR_EXT_JARS.add(jarPathResolved);
                        }
                        try {
                            final File canonicalFile = file.getCanonicalFile();
                            final String canonicalFilePath = canonicalFile.getPath();
                            if (!canonicalFilePath.equals(filePath)) {
                                final String canonicalJarPathResolved = FastPathResolver
                                        .resolve(FileUtils.CURR_DIR_PATH, filePath);
                                JRE_LIB_OR_EXT_JARS.add(canonicalJarPathResolved);
                            }
                        } catch (IOException | SecurityException e) {
                            // Ignored
                        }
                    }
                }
                return true;
            }
        }
        return false;
    }