< prev index next >

src/java.base/share/classes/java/lang/module/ModuleFinder.java

Print this page

        

*** 40,49 **** --- 40,51 ---- import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; + import jdk.internal.module.ModulePath; + import jdk.internal.module.SystemModuleFinder; import sun.security.action.GetPropertyAction; /** * A finder of modules. A {@code ModuleFinder} is used to find modules during * <a href="Configuration.html#resolution">resolution</a> or
*** 135,145 **** */ Set<ModuleReference> findAll(); /** * Returns a module finder that locates the <em>system modules</em>. The ! * system modules are typically linked into the Java run-time image. * The module finder will always find {@code java.base}. * * <p> If there is a security manager set then its {@link * SecurityManager#checkPermission(Permission) checkPermission} method is * invoked to check that the caller has been granted {@link FilePermission} --- 137,147 ---- */ Set<ModuleReference> findAll(); /** * Returns a module finder that locates the <em>system modules</em>. The ! * system modules are the modules in the Java run-time image. * The module finder will always find {@code java.base}. * * <p> If there is a security manager set then its {@link * SecurityManager#checkPermission(Permission) checkPermission} method is * invoked to check that the caller has been granted {@link FilePermission}
*** 164,174 **** home = System.getProperty("java.home"); } Path modules = Paths.get(home, "lib", "modules"); if (Files.isRegularFile(modules)) { ! return new SystemModuleFinder(); } else { Path mlib = Paths.get(home, "modules"); if (Files.isDirectory(mlib)) { return of(mlib); } else { --- 166,176 ---- home = System.getProperty("java.home"); } Path modules = Paths.get(home, "lib", "modules"); if (Files.isRegularFile(modules)) { ! return SystemModuleFinder.getInstance(); } else { Path mlib = Paths.get(home, "modules"); if (Files.isDirectory(mlib)) { return of(mlib); } else {
< prev index next >