List<String> (final List<String> classpath, final List<String> jarDirectories) { List<String> result = new ArrayList<>(classpath); for (String directory : jarDirectories) { addAllJarsFromDirectory(result, new File(directory)); } return result; }