< prev index next >
src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java
Print this page
*** 36,46 ****
import java.net.URI;
import java.net.URLConnection;
import java.nio.ByteBuffer;
import java.nio.file.Files;
import java.nio.file.Path;
- import java.nio.file.Paths;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Deque;
--- 36,45 ----
*** 183,193 ****
return finder;
}
// probe to see if this is an images build
String home = System.getProperty("java.home");
! Path modules = Paths.get(home, "lib", "modules");
if (Files.isRegularFile(modules)) {
if (USE_FAST_PATH) {
SystemModules systemModules = allSystemModules();
if (systemModules != null) {
finder = of(systemModules);
--- 182,192 ----
return finder;
}
// probe to see if this is an images build
String home = System.getProperty("java.home");
! Path modules = Path.get(home, "lib", "modules");
if (Files.isRegularFile(modules)) {
if (USE_FAST_PATH) {
SystemModules systemModules = allSystemModules();
if (systemModules != null) {
finder = of(systemModules);
*** 203,213 ****
return finder;
}
// exploded build (do not cache module finder)
! Path dir = Paths.get(home, "modules");
if (!Files.isDirectory(dir))
throw new InternalError("Unable to detect the run-time image");
ModuleFinder f = ModulePath.of(ModuleBootstrap.patcher(), dir);
return new ModuleFinder() {
@Override
--- 202,212 ----
return finder;
}
// exploded build (do not cache module finder)
! Path dir = Path.get(home, "modules");
if (!Files.isDirectory(dir))
throw new InternalError("Unable to detect the run-time image");
ModuleFinder f = ModulePath.of(ModuleBootstrap.patcher(), dir);
return new ModuleFinder() {
@Override
< prev index next >