开发者

Windows 7 PATH environment variable expansion [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

In Windows 7 I set the PATH environment variable thus:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%JAVA_HOME%\bin;%M2_HOME%\bin;%ANT_HOME%\bin;R:\bin;P:\bin;C:\Program Files (x86)\Common Files\Intuit\QBPOSSDKRuntime;C:\Program Files\开发者_如何学CSlikSvn\bin\;C:\Program Files\TortoiseSVN\bin

When I log out and log in, and then bring up a command prompt, all my environment variables are properly expanded---except M2_HOME. If I bring up the edit window for the PATH environment variable and simply hit OK with no edits, when I open up a command prompt the M2_HOME variable is properly replaced, and remains so until I log out.

I don't understand this. Even if this were a definition order problem, M2_HOME appears before PATH alphabetically. What's going on?


While this is not a solution, I hope this will help you track down your issue. I have recently faced various issues with Windows 7 and Path expansion. Try removing the entries you have with spaces, if that does not help, remove everything except the stock entries and M2_HOME. I am just recommending you to remove this to see if it helps you track down your issue. If you determine that an entry with a space is causing this, we can look for another solution (8.3 path?)...


I have Windows 7 and use maven, so I have M2_HOME and M2 environment variables and they work OK. If you want to see what's going on inside you can use the RapidEE environment variable editor. That may help.

  • www.RapidEE.com

I can show you what I have:

  • M2 = %M2_HOME%\bin
  • M2_HOME = b:\repository\maven\v03.00
  • path = ...;%M2%; ...

Seems to work OK. I didn't do much checking on expansions because everything was working.

If I look at path in the shell, is expands to

  • path = ...;b:\repository\maven\v03.00\bin; ...

Good luck, w.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜