From 3e7beab7fa567eed17b3602951a75b0718823fdb Mon Sep 17 00:00:00 2001 From: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:38:41 +0200 Subject: [PATCH] [Windows] Fix Java 21 location (#8585) --- images/win/scripts/Installers/Install-JavaTools.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1 index 7670b4c3..d56d5035 100644 --- a/images/win/scripts/Installers/Install-JavaTools.ps1 +++ b/images/win/scripts/Installers/Install-JavaTools.ps1 @@ -73,6 +73,8 @@ function Install-JavaJDK { # 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 $fullJavaVersion = $asset.version.semver -replace '\+', '-' + # Remove 'LTS' suffix from the version if present + $fullJavaVersion = $fullJavaVersion -replace '\.LTS$', '' # Create directories in toolcache path $javaToolcachePath = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "Java_Temurin-Hotspot_jdk" $javaVersionPath = Join-Path -Path $javaToolcachePath -ChildPath $fullJavaVersion