Repository navigation
Allow additional jlink arguments - #491
Merged
Merged
Conversation
- problem: a customized JRE can't be tuned, e.g. with --include-locales, and below JDK 21 its precompressed modules image makes zipballs and installers bigger than with no jlink compression - cause: BundleJre builds the jlink command line from fixed arguments - solution: new additionalJlinkArgs property, appended to the jlink call, so a --compress given there overrides the default one Signed-off-by: Till Seifert <me@till-seifert.de>
fvarrui
added a commit
that referenced
this pull request
Oct 5, 2026
The merge of #491 brought back the running Java's version for the default --compress=2. README: --include-locales needs jdk.localedata, and jlink options depend on the packaging JDK version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Merged, thanks Till! 🙏 Before merging I tested it with JDK 11, 17, 21 and 25 (Maven, GNU/Linux):
I added both notes to the README. The tests also showed that a customized JRE failed on JDK 24+ builds without It'll be in 2.0.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our app only needs German and English, but a customized JRE always contains the locale data of every language:
jdk.localedatais 21.5 MB of the image.jlink --include-localeswould drop it, but there is no way to pass that option, becauseBundleJrebuilds thejlinkcommand line from fixed arguments.Measured on our app with JDK 17:
This PR adds an
additionalJlinkArgsproperty for Maven and Gradle, appended to thejlinkcall:Since the arguments come last, a
--compressgiven there also overrides the default--compress=2. That helps installers: an image compressed by jlink can't be compressed again by the zipball or installer. Nothing changes for existing builds.