Error : 'javac' is not recognized as an internal or external command,

Solution 1:

The Java Compiler (javac) is installed with the Java Development Kit (jdk), not the Java Runtime Environment (jre)

If you have not already done so, go to the Oracle website and look for the JDK version that you need.

After installing it, set the path to the following:

set path=C:\Program Files (x86)\Java\jdk1.8.0_171\bin

(assuming you're going to install the equivalent architecture/version of jdk that you installed of jre above)