Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions src/jdk.jlink/share/man/jlink.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,15 @@ Developers are responsible for updating their custom runtime images.
`--bind-services`
: Link service provider modules and their dependencies.

`-c ={0|1|2}` or `--compress={0|1|2}`
: Enable compression of resources:
`-c=zip-[0-9]` or `--compress=zip-[0-9]`
: Enable compression of resources. The accepted values are:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for --compress. Can you double check that -c actually works?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for spotting this! -c does not work and jlink --help command does not list it either. Will remove it from this part.

Copy link
Contributor

@AlanBateman AlanBateman Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect something has got messed up in the CLI parsing. -c should be the short form of --compress. At this time, -c, with no params, is the equivalent of --compress 2 so we get a confusing warning. As we've found, providing parameters to the short form doesn't seem to work. So I think we need to dig into this more.

Also a comment on the "Deprecated values to be removed in a future release" section. It would be easy to read it that zip-0 and zip-6 are being deprecated. Instead of "Equivalent to zip-0", then maybe we should say "Use zip-0 instead".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So maybe I should investigate first what happened to -c argument and then improve the documentation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great, if you have the cycles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into the issue and provided a fix. Hence I modified the description of this PR and issue related to it. Please let me know if is ok to change the title of the bug and PR as well, to proper reflect the changes introduced. Thank you 🙏 .

zip-[0-9], where zip-0 provides no compression,
and zip-9 provides the best compression. Default is zip-6.

- `0`: No compression
: Deprecated values to be removed in a future release:
- `0`: No compression. Equivalent to zip-0.
- `1`: Constant string sharing
- `2`: ZIP
- `2`: ZIP. Equivalent to zip-6.

`--disable-plugin` *pluginname*
: Disables the specified plug-in. See [jlink Plug-ins] for the list of
Expand Down Expand Up @@ -170,14 +173,18 @@ For a complete list of all available plug-ins, run the command
### Plugin `compress`

Options
: `--compress=`{`0`\|`1`\|`2`}\[`:filter=`*pattern-list*\]
: `--compress=zip-`[`0`-`9`]\[`:filter=`*pattern-list*\]

Description
: Compresses all resources in the output image.
Accepted values are:
zip-[0-9], where zip-0 provides no compression,
and zip-9 provides the best compression. Default is zip-6.

- Level 0: No compression
: Deprecated values to be removed in a future release:
- Level 0: No compression. Equivalent to zip-0.
- Level 1: Constant string sharing
- Level 2: ZIP
- Level 2: ZIP. Equivalent to zip-6.

An optional *pattern-list* filter can be specified to list the pattern of
files to include.
Expand Down