There are two potential related issues with the validation and handling of javac's --system flag
(1) jrt-fs.jar is resolved at lib/jrt-fs.jar during validation, but at just jrt-fs.jar on the code path below. This looks like an oversight in the fix forJDK-8169816 (Move src.zip and jrt-fs.jar under the lib directory) which only updated one of the two paths:
https://github.com/openjdk/jdk/blob/9a866344345291942bf3f6fb27c809cc9009fed7/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java#L1399
https://github.com/openjdk/jdk/blob/9a866344345291942bf3f6fb27c809cc9009fed7/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java#L1452
(2) SystemModulesLocationHandler#update validates that `!Files.exists(p.resolve("lib").resolve("jrt-fs.jar")) && !Files.exists(systemJavaHome.resolve("modules"))`. It seems wrong that it's checking the previous value (systemJavaHome) instead of the new value (p)
https://github.com/openjdk/jdk/blob/9a866344345291942bf3f6fb27c809cc9009fed7/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java#L1399-L1400
(1) jrt-fs.jar is resolved at lib/jrt-fs.jar during validation, but at just jrt-fs.jar on the code path below. This looks like an oversight in the fix for
https://github.com/openjdk/jdk/blob/9a866344345291942bf3f6fb27c809cc9009fed7/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java#L1399
https://github.com/openjdk/jdk/blob/9a866344345291942bf3f6fb27c809cc9009fed7/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java#L1452
(2) SystemModulesLocationHandler#update validates that `!Files.exists(p.resolve("lib").resolve("jrt-fs.jar")) && !Files.exists(systemJavaHome.resolve("modules"))`. It seems wrong that it's checking the previous value (systemJavaHome) instead of the new value (p)
https://github.com/openjdk/jdk/blob/9a866344345291942bf3f6fb27c809cc9009fed7/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java#L1399-L1400
- relates to
-
JDK-8169816 Move src.zip and jrt-fs.jar under the lib directory
-
- Resolved
-