Skip to content

Commit

Permalink
fix: set jlink compression arg to zip-6 for Windows jdk21 image (#1864
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lemeurherve authored Apr 30, 2024
1 parent 12ba1e2 commit 97150a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions windows/windowsservercore/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ RUN Write-Host 'javac --version' ; javac --version ; `

RUN $version = (jlink --version) ; `
$stripJavaDebugFlags = '--strip-java-debug-attributes' ; `
$compressArg = '--compress=2' ; `
# jlink version 11 has less features than JDK17+
if ($version.StartsWith('11')) { `
$stripJavaDebugFlags = '--strip-debug' ; `
} `
# jlink version 11 has less features than JDK17+
if ($version.StartsWith('21')) { `
$compressArg = '--compress=zip-6' ; `
} `
& jlink `
--add-modules ALL-MODULE-PATH `
$stripJavaDebugFlags `
Expand Down

0 comments on commit 97150a5

Please sign in to comment.