A DESCRIPTION OF THE PROBLEM :
There are several points:
* `jlink --help` states the usage is as follows:
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
but "--module-path" is, in fact, optional, and jlink will attempt to use the JDK's jmods directory in that case
* in `jlink--help`, the "--module-path" option merely states "Module path". However, it should at least also state that:
** if unspecified, the JDK's jmods directory will be used, if it exists
** if specified, but it doesn't contain the java.base module, the JDK's jmods directory will be added, if it exists
* when running jlink from a run-time image (i.e. there's no jmods directory) without specifying "--module-path", the error message is: "Error: --module-path must be specified"
However, this is not true and rather unhelpful: it should state something like: "Error: --module path is unspecified, and this run-time image doesn't contain a jmods directory (which is used as the default if --module-path is unspecified) either"
There are several points:
* `jlink --help` states the usage is as follows:
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
but "--module-path" is, in fact, optional, and jlink will attempt to use the JDK's jmods directory in that case
* in `jlink--help`, the "--module-path" option merely states "Module path". However, it should at least also state that:
** if unspecified, the JDK's jmods directory will be used, if it exists
** if specified, but it doesn't contain the java.base module, the JDK's jmods directory will be added, if it exists
* when running jlink from a run-time image (i.e. there's no jmods directory) without specifying "--module-path", the error message is: "Error: --module-path must be specified"
However, this is not true and rather unhelpful: it should state something like: "Error: --module path is unspecified, and this run-time image doesn't contain a jmods directory (which is used as the default if --module-path is unspecified) either"
- relates to
-
JDK-8189777 jlink --module-path default value and automatic addition of $JAVA_HOME/jmods if java.base is missing
- Resolved