Skip to content

Instantly share code, notes, and snippets.

@froop
Last active August 3, 2022 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froop/d62b1710d34dc45a52533815b120bcdd to your computer and use it in GitHub Desktop.
Save froop/d62b1710d34dc45a52533815b120bcdd to your computer and use it in GitHub Desktop.
[Windows] Insatall Oracle Java 8
$URL = "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=246808_424b9da4b48848379167015dcc250d8d" # 8u341
#$URL = "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=246474_2dee051a5d0647d5be72a7c0abff270e" # 8u333
#$URL = "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245807_df5ad55fdd604472a86a45a217032c7d" # 8u321
#$URL = "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245479_4d5417147a92418ea8b615e228bb6935" # 8u311
(New-Object System.Net.WebClient).DownloadFile($URL, "C:\jre8.exe")
cmd /C "C:\jre8.exe" /s
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files\Java\jre1.8.0_341", "Machine")
Remove-Item "C:\jre8.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment