Windows 7 environment variable not working in path

后端 未结 14 2089
[愿得一人]
[愿得一人] 2020-12-07 23:00

I am trying to set up some path using environment variable. I added an environment variable \"MAVEN_HOME\" with the value \"C:\\maven\". Then in the path I added \"%MAVEN_HO

14条回答
  •  囚心锁ツ
    2020-12-07 23:35

    To address this problem, I have used setx command which try to set user level variables.

    I used below...

    setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_92"
    
    setx PATH %JAVA_HOME%\bin
    

    NOTE: Windows try to append provided variable value to existing variable value. So no need to give extra %PATH%... something like %JAVA_HOME%\bin;%PATH%

提交回复
热议问题