Download the java setup file from the following link –
A: Accept the agreement.
B: Download one of the encircled items depending upon your machine architecture (32-bit or 64-bit)
Once the file is downloaded successfully, click on the setup file and go on clicking ‘Next’ as prompted. It might take few seconds to a minute or two to complete the installation.
When prompted, click Next to the JRE installation as well.
Java is successfully installed on your computer now, but in order to use the compiler and the JVM, you need to set your environment variables. Let’s do it.
On My Computer icon, right click and choose Properties.
Choose Advanced System Settings from the System Properties –
On pop-up window, choose Environment Variables –
Choose Path Variable from User Variables for the user and click on Edit –
Now locate the Java Installation Folder on your computer.
It is generally on the location – C:/Program Files/Java
Go to the bin folder inside Java installation folder and select the path of the installation.
It would look something like this.
Copy the address to the clipboard.
After the windows original path in Environment Variables, append a semi-colon and then paste the path on the clipboard.
Click OK again, and then again on main window
Checking the installation-
Search cmd in windows search and launch command prompt.
Write Javac and hit enter. You should get several options and information about java on command prompt.
If you get that java is not recognized as an internal or external command, operable program or batch file, then you should go back and again try following the above steps correctly.