Pipelines/Steps/Install/OnPrem/Solr/Install-Prerequisites.ps1

$ErrorActionPreference = "Stop"

function InstallJRE {
    try {
        choco upgrade jre8 -PackageParameters "/exclude:32" -y --limitoutput
        RefreshEnvironment
    }
    catch {
        Write-Warning "SAF was not able to install the latest JRE. Please, install it manually..."
        Start-Sleep 5
    }
}

Write-Output "Configuring Solr Prerequisites..."
InstallJRE
Write-Output "Configuring Solr Prerequisites done."