First step is downloading installation file. Go to Oracle website.
In the Download tab on website click the
JDK DOWNLOAD button. You see content:
Click the Accept Licence Agreement.
In the next step click jdk file link and download exe installation file.
Run exe file and follow steps.
The last step after installation is configuration, Windows OS has to have the setted path to bin catalogue in jdk. Open Control Panel and click on System and Select System and Security. In this window click on Advanced System Settings. In Advanced System Settings window click on Environment Variables. In System Variables select Path and click on Edit button. Add on end path for bin folder. In my system it is C:\Program Files\Java\jdk-9.0.4\bin. Click on OK button in all opened windows.
You can set paths in User Variables JAVA_HOME and JRE_HOME variables to jdk and jre folders. And then in Path write using these names set paths.
Test Java. Open Command Line window and write in it:
You see information looks like it: