This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Set<File> jars = InstalledFileLocator.getDefault().locateAll(jar, name, false);
if (jars.isEmpty()) {
throw new FileNotFoundException(jar);
} else if (jars.size() == 1) {
} else if (jars.size() == 1 || Boolean.getBoolean("org.netbeans.core.startup.ModuleList.firstModuleJarWins")) {
return jars.iterator().next();
} else {
// Pick the newest one available.