[Windows] Move the list of installed Java versions to toolset (#2369)

* added java to toolset

* updated java tests

* fixed windows2016.json

* fixed tests

* fixed java.Tests

* fixed Java.Tests.ps1

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
Nikita Bykov
2021-01-13 10:48:09 +03:00
committed by GitHub
parent 7457b9fecb
commit d20a55914c
5 changed files with 28 additions and 13 deletions

View File

@@ -77,8 +77,8 @@ function Install-JavaFromAdoptOpenJDK {
Extract-7Zip -Path $archivePath -DestinationPath $DestinationPath
}
$jdkVersions = @(7, 8, 11, 13)
$defaultVersion = 8
$jdkVersions = (Get-ToolsetContent).java.versions
$defaultVersion = (Get-ToolsetContent).java.default
$javaRootPath = "C:\Program Files\Java\"
foreach ($jdkVersion in $jdkVersions) {