Follow these steps to install Java:
- Download the latest version of Java JRE (x86 or x64 based on your OS) from https://java.com/en/download/manual.jsp.
- Follow the installation procedures.
- To check that Java has been installed successfully, run the following command using Command Prompt:
java -version
- You should get the following output:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
- To set the JAVA_HOME, first get the Java installation path on Windows using the following command:
where java
- The previous command should output the Java installation path, as shown in the following command. Copy the path without \bin\java ...