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_HOME = 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";

Comments

Popular posts from this blog

How to get context path in JQuery?

How to extend Liferay 6.2 session timeout by AJAX call?