mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 07:40:42 +07:00
[java] diagnostics for missing JRT FS provider (EA-84606)
This commit is contained in:
@@ -60,7 +60,9 @@ class JrtHandler extends ArchiveHandler {
|
||||
fs = FileSystems.newFileSystem(ROOT_URI, Collections.singletonMap("java.home", getFile().getPath()));
|
||||
}
|
||||
else {
|
||||
URL url = new File(getFile(), "jrt-fs.jar").toURI().toURL();
|
||||
File file = new File(getFile(), "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);
|
||||
fs = FileSystems.newFileSystem(ROOT_URI, Collections.emptyMap(), loader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user