If everything seems to be in order but you still face issues, try uninstalling Java/JDK and installing an older version. Sometimes, an API/method which was available in older versions, may be deprecated in newer versions. Sometimes, some versions of Java may have issues / incompatibilities.The look and feel of the dialog boxes may change from time to time but the process of installation will be similar.Your version numbers may differ based on your installer.
JRE is simply listed as “Java 8 Update 201 (64 bit)”.
The JDK is listed as “Java SE Development Kit” in Programs and Features in Windows. If you already have a JRE installed, its recommended to uninstall it and install the JRE which is included with the JDK. It is recommended to use the same version of JRE and JDK to avoid any issues.Do not install the JRE from, if you are planning to develop programs using Java, you need the JDK.During installation, you need to install both the JDK and the JRE The JDK installer also includes with the JRE.The Java Development Kit (JDK) comes with the Java compiler, which is required to compile Java programs.However, developers and testers who are working on Selenium or Java, need to download and install the Java Development Kit (JDK).
Now that you know how to download and install Java, let us quickly understand the difference between the Java Runtime Environment (JRE) and the Java Development Kit (JDK).
Once the installation is complete, you will be presented with the dialog box shown below, confirming the completion.Its recommended to proceed with the default values and click the Next button. Now you will be asked to choose the destination folder for the Java Runtime Environment (JRE).If you are not presented with this screen, simply ignore this step and go to the next step.