We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 261a238 commit 5311440Copy full SHA for 5311440
eng/scripts/InstallJdk.ps1
@@ -25,3 +25,11 @@ mkdir (split-path -parent $env:JAVA_HOME) -ea ignore | out-null
25
Write-Host "Installing JDK to $env:JAVA_HOME"
26
Move-Item "$tempDir/jdk/jdk-${jdkVersion}" $env:JAVA_HOME
27
Write-Host "Done installing JDK to $env:JAVA_HOME"
28
+
29
+if(-not $env:Path.Contains($env:JAVA_HOME)){
30
+ Write-Host "Update PATH to include JAVA";
31
+ $path = "$env:JAVA_HOME;$env:Path";
32
+ [System.Environment]::SetEnvironmentVariable("PATH", $path, "User");
33
+}
34
35
0 commit comments