Skip to content

Commit 3e7beab

Browse files
[Windows] Fix Java 21 location (#8585)
1 parent 6449d50 commit 3e7beab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

images/win/scripts/Installers/Install-JavaTools.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ function Install-JavaJDK {
7373

7474
# We have to replace '+' sign in the version to '-' due to the issue with incorrect path in Android builds https://github.com/actions/runner-images/issues/3014
7575
$fullJavaVersion = $asset.version.semver -replace '\+', '-'
76+
# Remove 'LTS' suffix from the version if present
77+
$fullJavaVersion = $fullJavaVersion -replace '\.LTS$', ''
7678
# Create directories in toolcache path
7779
$javaToolcachePath = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "Java_Temurin-Hotspot_jdk"
7880
$javaVersionPath = Join-Path -Path $javaToolcachePath -ChildPath $fullJavaVersion

0 commit comments

Comments
 (0)