On 08/02/2022 14:17, Glavo wrote:
:
In addition, I think there are other better options for the out-of-the-box
availability of jlink.
I noticed that a copy of everything in jmod already exists in the JDK
folder.
In fact, jmod of JDK core module only needs to store a file list (List of
paths of all native libraries, executable files and legal files),
original content backup of some modifiable content (e.g. conf files), and
the name of module.
We can re extract the complete jmod file from JDK through these meta
information, the size of these meta information is completely negligible.
I'm spending some free time trying to implement such a tool, and I don't
think it's difficult.
Just an FYI that there are transformations and some class generation at
link time that means the classes/resources in the run-time image aren't
identical to the those in the packaged modules.
-Alan