Windows 7 environment variable not working in path

后端 未结 14 2151
[愿得一人]
[愿得一人] 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:33

    Things like having %PATH% or spaces between items in your path will break it. Be warned.

    Yes, windows paths that include spaces will cause errors. For example an application added this to the front of the system %PATH% variable definition:

    C:\Program Files (x86)\WebEx\Productivity Tools;C:\Sybase\IQ-16_0\Bin64;
    

    which caused all of the paths in %PATH% to not be set in the cmd window.

    My solution is to demarcate the extended path variable in double quotes where needed:

    "C:\Program Files (x86)\WebEx\Productivity Tools";C:\Sybase\IQ-16_0\Bin64;
    

    The spaces are therefore ignored and the full path variable is parsed properly.

提交回复
热议问题