I have two user defined variables:
ANT_HOME set to %USERPROFILE%\Developer\Tools\Apache\Apache Ant\apache-ant-1.8.2 JAVA_HOME set to C:\Program Files\Java\jdk1.6.0_23
And I want append those paths to the System variable so I can access the executables in their bin folders. I tried
PATH set to [other paths];%ANT_HOME%\bin;%JAVA_HOME%\bin
However, that doesn't work. When I open a command-prompt and echo %PATH% the user variables are not expanded. So the path just shows the literal, ;%ANT_HOME%\bin;%JAVA_HOME%\bin
I seem to recall this working fine on my old Windows XP systems. How do I set this up on Windows 7?
Answer
A Microsoft Support article from way back in 2007 — number 329308 — describes a bug in Shell32.dll, which is the cause of this problem. The solution is to add a PATH variable to the user variables list that is set to
%ANT_HOME%\bin;%JAVA_HOME%\bin
This worked around the issue. I don't like setting it for just my user, but somehow my system is presenting symptoms of this old bug and I see no other better answer yet.
No comments:
Post a Comment