Scroll down the System Variables list, select the variable, and click Edit . Click New and add the following line: %JAVA_HOME%\bin . Click OK on all remaining windows to save the changes. Verifying Your Installation
After installation, open your Command Prompt (Windows) or Terminal (Mac/Linux) and type:
java version "1.8.0_401" Java(TM) SE Runtime Environment (build 1.8.0_401-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.401-b10, mixed mode) Use code with caution.
On Linux distributions, it is easiest to use the built-in package manager to install OpenJDK 8:





