On Fri, 17 Apr 2026 15:57:19 GMT, Severin Gehwolf <[email protected]> wrote:
>> jrtfs is not used by the system ModuleReader or any part of the runtime.
>> jrtfs is for tooling, mostly javac, and doesn't strictly need to be in
>> java.base.
>
> AFAIK, it's used by `JRTArchive`, IIRC. I might be wrong, though. The URLs
> returned by ModuleReader are `jrt:/` type URLs at least.
>
>
> jshell> var uri =
> ModuleFinder.ofSystem().find("java.base").orElseThrow().open().find("java/lang/Object.class").get();
> uri ==> jrt:/java.base/java/lang/Object.class
>
> jshell> Files.size(Path.of(uri));
> $15 ==> 2479
David is working on an "end to end" test that will run jlink to create a
run-time image that contains classes compiled with preview features enabled in
META-INF/preview. Running a test with the resulting run-time image, both with
preview features enabled and disabled, will ensure that it works as expected.
It will need to be run with the default config, and builds that were configured
with `--enable-linkable-runtime` of course.
But maybe your question is more about running the jlink tool itself with
preview features enabled? I suspect `jlink -J--enable-preview` would be rare,
but executing it with ToolProvider (and thus in-process) is important to test
too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r3109282002