-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jlink deprecation warning for --compress '2' parameter on JDK21 #383
Comments
Hi @streamingdv! |
@fvarrui according to the link I posted above following is mentioned
So I guess on java >= 21 switching to |
Oh! Sorry, I didn't notice the link 😅 |
FYI: 0-9 in the context of ZIP is the zlib/deflate compression level (which is a choice between speed and size and has nothing to do with the previous 0/1/2), and based on https://github.com/openjdk/jdk/blob/6d2f6408e417b267be0345f63656f232cf247b6d/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java#L48 the equivalent to |
For reference, given
|
Ok, as // generates customized jre using modules
CommandUtils.execute(
jlink,
"--module-path", modulesDir,
additionalModulePathsToParams(additionalModulePaths),
"--add-modules", modules,
"--output", destinationFolder,
"--no-header-files",
"--no-man-pages",
"--strip-debug",
(VersionUtils.getJavaMajorVersion() < 21 ? "--compress=2" : null)
); |
Fixed!!! |
I tested It with different JDK versions and it seems to be working fine |
v1.7.6 released to Maven Central |
I'm submitting a…
Short description of the issue/suggestion:
Deprecation warning is printed by jlink when used on a computer with JDK 21 installed
Steps to reproduce the issue/enhancement:
Use javapackger on a machine where JAVA_HOME is set to JDK 21
What is the expected behavior?
Ideally no deprecation warnings
What is the current behavior?
jlink produces following warning:
The 2 argument for --compress is deprecated and may be removed in a future release
Please tell us about your environment:
Other information (e.g. related issues, suggestions how to fix, links for us to have context)
https://nipafx.dev/road-to-21-upgrade/#tools
The text was updated successfully, but these errors were encountered: