How to install java using chocolatey / choco in windows
What is chocolatey?
Chocolatey is a CLI (command line interface) based package manager tool for windows. Using this package manager many software can be installed without any hassle of configuring the environment path in windows and installing many software can be done with a single command. To install this chocolatey, I have already shared a installation guide.
How to install java using choco?
After installing chocolatey / choco, run the following command in a regular command prompt or Powershell prompt to install JAVA SE.
C:\>choco install jdk8
Chocolatey v0.10.15
Installing the following packages:
jdk8
By installing you accept licenses for the packages.
jdk8 v8.0.211 already installed. Forcing reinstall of version '8.0.211'.
Please use upgrade if you meant to upgrade to a new version.
Progress: Downloading jdk8 8.0.211... 100%
jdk8 v8.0.211 [Approved]
jdk8 package files install completed. Performing other installation steps.
The package jdk8 wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): A
Downloading JDK from https://javadl.oracle.com/webapps/download/GetFile/1.8.0_211-b12/478a62b7d4e34b78b671c754eaaf38ab/windows-i586/jdk-8u211-windows-x64.exe
Installing jdk8...
jdk8 has been installed.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of jdk8 was successful.
Software installed to 'C:\Program Files\Java\jdk1.8.0_211\'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log)
Conclusion
Hope you like this post. Please share you thoughts, doubts and questions through comments under this post. Thanks for reading this. I also have a youtube channel, watch and support my channel.
If you find something really helpful, please donate me @paypal
Comments
Post a Comment