File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 99 install :
1010 commands :
1111 # force install java21 while we work throuh path issues
12- - |
13- $url = 'https://corretto.aws/downloads/latest/amazon-corretto-21-x64-windows-jdk.msi';
14- Write-Host ('Downloading from {0}' -f $url);
15- [ Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
16- Invoke-WebRequest -Uri $url -OutFile 'corretto_jdk_build.msi';
17- Start-Process 'corretto_jdk_build.msi' -PassThru | Wait-Process;
18- Write-Host 'Removing ...';
19- Remove-Item corretto_jdk_build.msi -Force;
2012 - |
2113 $javaName = "C:\Program Files\Amazon Corretto" | ForEach-Object {
22- ls $_ | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
14+ ls $_ | Where-Object {$_ -Like "jdk*"} | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
2315 }
2416 $JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
2517 - |
You can’t perform that action at this time.
0 commit comments