void (List<File> classpath, File mavenHome) { addDir(classpath, new File(mavenHome, "lib"), f -> !f.getName().contains("maven-slf4j-provider")); File bootFolder = new File(mavenHome, "boot"); File[] classworldsJars = bootFolder.listFiles((dir, name) -> StringUtil.contains(name, "classworlds")); if (classworldsJars != null) { Collections.addAll(classpath, classworldsJars); } }