0


Most of the Program required some environment variable to be defined like JAVA_HOME for Maven Project.
Many people even in today world do it by manually like go to advanced system setting in Windows and set the Environment Variables but for Techie people this is not the way to do.
Here I am sharing one Utility which will do thing for you guys.

Two ways to Define environment variable
  1. By Manually go to MY COMPUTER > System properties >Advanced System setting>Environment Variables
  2. Through Command Line (Bat file also ) :- For this you have to only only the Notepad and write the below line 
setx <ENVIRONMENT_VARIABLE_NAME>  "<REQUIRED PATH>"
Eg- setx JAVA_HOME "C:\Program Files (x86)\Java\jdk1.7.0_02"

and now save the file with .bat file (eg EvnironmentVariable.bat) Now you can just double click the bat file and it will automatically define the environment variable.

VERIFICATION OF INSTALL VARIABLE (FOR JAVA_HOME)
- for verify the installed variable you can check it in cmd
- for java_home - type "%JAVA_HOME%" in cmd , you will get like below snap.



Here I uploaded one bat file for Demo purpose .You can Download it


Post a Comment Blogger

 
Top
Don't Forget To Join US Our Community
Follow Us On Twitter
Plus One US
×