How to set environment variables using command line?
For example, if the JDK is installed at C:\Program Files\Java\jdk1.8.0 , then you need to set: JAVA_HOM E = C:\Program Files\Java\jdk1.8.0 PATH = PATH + C:\Program Files\Java\jdk1.8.0\bin Setting these environment variables on Windows is not difficult. Just go to Control Panel > System > Advanced system settings > Advanced > Environment Variables. You can see the whole steps to setup this stuff in the following article: In command prompt hit following command: setx -m JAVA_HOME "C:\Program Files\Java\jdk1.8.0" setx -m PATH "%PATH%;%JAVA_HOME%\bin";