You can visit Oracle Help Center for Installation of the JDK and the JRE on Microsoft Windows Platforms and to download JDK visit download page. Click on the version you want for your system, it will ask for Terms and Conditions approval, once confirmed it will start downloading files.
I have downloaded “jdk-15_windows-x64_bin.exe” then installed it in my system.
To install JDK, open the download folder of your windows 10 system. Double click on the executable file (in my case “jdk-15_windows-x64_bin.exe“). Windows will ask for permission to allow installation in the system, once allowed (by clicking Yes), the system will process further. Follow the steps during installation process as shown below in images:
After the installation is complete, delete the downloaded file to recover the disk space. (Optional)
You can verify your JDK installation by visiting your installation path of JDK. In my case it is “C:\Program Files\Java\jdk-15“.
Setting the PATH Environment Variable, so that Java is accessible globally in the system.
To set the PATH variable permanently, add the full path of the “C:\Program Files\Java\jdk-15\bin” directory to the PATH variable.
- Select Control Panel and then System.
- Click Advanced and then Environment Variables.
- Add the location of the bin folder of the JDK installation to the PATH variable in System Variables, as a new line entry.
- Click OK for “Edit environment variable window”
- then click OK for “Environment Variables window”
- then click OK for “System Properties window”
- and close the System Control Panel.