Set the environment variable JAVA_HOMEto indicate the path to your JDK 8 installation .
This can be done on the command line, as shown in the following example:
SET JAVA_HOME="C:\Program Files (x86)\Java\jdk1.8.0_131"
SET PATH=%JAVA_HOME%\bin;%PATH%
, JDK PATH :
javac -version