Accept the license terms by selecting “I reviewed and accept the Oracle Technology Network License Agreement for Oracle Java SE” and then pressing
Download jdk-140.02_windows-x64_bin-exe. You may need to create an Oracle account. If required, you need to create it in order to download the file later.
Step 3:
Wait a few minutes for the file to download, then double click on jdk-140.02_windows-x64_bin-exe (or in any case on the file you just downloaded) and click Next.
Step 4:
At the end of the installation go to the desktop, and access the path C:\Program Files\Java or C:\ Program Files\Java (see figure).
-Environment variables
Step 5:
Type variable to search the dialog System properties
Under the heading "System variables", click on "New ...".
Step 6:
Fill in the Variable name field with JAVA_JDK and the path C:\Program Files\Java\jdk-14.0.2
Step 7:
Still in the same window, double click on Path (see figure) and click on New adding the entry: %JAVA_JDK%\bin
Step 8:
Now you can close all windows and install an IDE program, in this case NetBeans: it will allow you to write programs in Java more easily.