[Windows] Add adoptium to javatools installer (#3985)

This commit is contained in:
Mikhail Koliada
2021-09-10 12:26:11 +03:00
committed by GitHub
parent d1d592805b
commit 045e638562
6 changed files with 95 additions and 25 deletions

View File

@@ -13,10 +13,11 @@ function Get-JavaVersions {
$versionInPath = (Split-Path $javaPath) -replace "\w:\\.*\\"
$version = $versionInPath -replace '-', '+'
$defaultPostfix = ($javaPath -eq $defaultJavaPath) ? " (default)" : ""
$VendorName = ($javaPath -like '*Java_Adopt_jdk*') ? "Adopt OpenJDK" : "Eclipse Temurin"
[PSCustomObject] @{
"Version" = $version + $defaultPostfix
"Vendor" = "Adopt OpenJDK"
"Vendor" = $VendorName
"Environment Variable" = $_.Name
}
}