JEP 493 introduced the possibility to use jlink without needing JMOD files of the JDK. Since it uses the current run-time image for assembling classes/resources for JDK modules a patched runtime (--patch-module switches) are problematic as the current implementation of JRTArchive uses ModuleFinder to list contents of a module.
In case of a patched runtime, the ModuleFinder includes the module patches for the JDK. If instead the implementation used the JRT file system for listing per module contents from the modules image (lib/modules) module patches on the current runtime don't matter as they would not be visible.
Therefore, if the JRT file system is being used throughout in JRTArchive the restriction on disallowing patched runtimes can go away.
In case of a patched runtime, the ModuleFinder includes the module patches for the JDK. If instead the implementation used the JRT file system for listing per module contents from the modules image (lib/modules) module patches on the current runtime don't matter as they would not be visible.
Therefore, if the JRT file system is being used throughout in JRTArchive the restriction on disallowing patched runtimes can go away.
- relates to
-
JDK-8343839 Detect patched modules and abort run-time image link early
- Resolved
-
JDK-8311302 Implement JEP 493: Linking Run-Time Images without JMODs
- Resolved