mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
[java] anticipates jrt-fs.jar move
This commit is contained in:
@@ -51,7 +51,8 @@ class JrtHandler extends ArchiveHandler {
|
||||
fs = FileSystems.newFileSystem(ROOT_URI, Collections.singletonMap("java.home", path));
|
||||
}
|
||||
else {
|
||||
File file = new File(path, "jrt-fs.jar");
|
||||
File file = new File(path, "lib/jrt-fs.jar");
|
||||
if (!file.exists()) file = new File(path, "jrt-fs.jar");
|
||||
if (!file.exists()) throw new IOException("Missing provider: " + file);
|
||||
URL url = file.toURI().toURL();
|
||||
ClassLoader loader = new URLClassLoader(new URL[]{url}, null);
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class JrtFileSystem extends ArchiveFileSystem {
|
||||
}
|
||||
|
||||
public static boolean isModularJdk(@NotNull String homePath) {
|
||||
return new File(homePath, "lib/modules").exists() && new File(homePath, "jrt-fs.jar").isFile();
|
||||
return new File(homePath, "lib/jrt-fs.jar").isFile() || new File(homePath, "jrt-fs.jar").isFile();
|
||||
}
|
||||
|
||||
public static boolean isRoot(@NotNull VirtualFile file) {
|
||||
|
||||
Reference in New Issue
Block a user