RFR: 8353185: Introduce the concept of upgradeable files in context of JEP 493 [v4]
Alan Bateman
alanb at openjdk.org
Thu Apr 10 09:06:33 UTC 2025
On Tue, 8 Apr 2025 13:31:10 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/LinkableRuntimeImage.java line 71:
>>
>>> 69: private static InputStream getDiffInputStream(String module) throws IOException {
>>> 70: String resourceName = String.format(DIFF_PATTERN, module);
>>> 71: return JDK_JLINK_MOD.getResourceAsStream(resourceName);
>>
>> FYI you can use LinkableRuntimeImage.class.getResourceAsStream here as the resource is in the current module.
>
> It's very odd, but when I attempt this then the resource is not found. It seems to fail on the module name verification. For example: `jlink --help | tail -n2` shows as `disabled` for an enabled linkable runtime image.
Without reproducing, I can't immediately say why Class.getResourceAsStream would fail here. This is a good API for locating resources in the caller's module.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24388#discussion_r2036873997
More information about the core-libs-dev
mailing list