On Fri, 18 Sep 2026 13:52:58 GMT, Alan Bateman <[email protected]> wrote:

>> It is a good idea to start with:
>> 
>> A :-separated list of elements, each of which is a file path to a module or 
>> a directory
>> containing modules. Each module is either a modular JAR file, a JMOD file, or
>> an exploded-module directory.
>> 
>> However, I think the subsequent text should emphasize that this option is 
>> primarily used to specify modules external to the JDK running jlink, while 
>> standard and JDK modules can be obtained from that JDK. I mean something 
>> along these lines:
>> 
>> Modules external to the JDK running jlink must always be specified on this 
>> path.
>> Standard and JDK modules can be obtained from that JDK because the specified
>> module path, if it does not contain java.base, is prepended to the default 
>> module path.
>> For cross-platform linking, the specified module path must contain all 
>> target-platform
>> modules required to create the image, including java.base.
>
> The module path specified to jlink is `--module-path` is prepended to its 
> default module path. I think we should just describe that and not use words 
> like "external" as it too different to how we document the module path in the 
> other tools, API docs, and JEPs.

OK. So what about the following ?

A ":"-separated list of elements, each of which is a file path to a module or a 
directory
containing modules. Each module is either a modular JAR file, a JMOD file, or
an exploded-module directory.
If the specified module path does not contain java.base, it is prepended to
the default module path.
For cross-platform linking, the specified module path must contain all 
target-platform
modules required to create the image, including java.base.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/32926#discussion_r4047644459

Reply via email to