How to set environment variable in Windows for java.
Installed java? Starting to learn to program in java or venturing in the android app realm, it turns out that even after installing java you are unable to get it to work. That is because java needs some environment variable fixing in order to work properly. How to set environment variable in Windows? You ask.
Now do that.
After installing java, right click on “My Computer” icon and
then click on properties.
![]() |
| System Properties |
Now click on the “Environment Variable” button at the
bottom.
Enter JAVA_HOME as the name, and the java installation directory
(not the bin folder) as the value.
Then click on OK, restart the system.



