New
#1
Buggy environment variable substitution - the order should NOT matter!
In preparation of an upcoming development project I downloaded and installed the latest Maven version.
Then - as instructed - I defined me two environment variables:
But for some strange reason the former %-placeholder 'M2' is not processed, i.e. "set" just yields:Code:M2=%M2_HOME%\bin M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.6.0
It seems that the order in which the env-var dialog stores these variables is important and if a former variable refers to one further down in the alphabetical list, then: bad luck!Code:M2=%M2_HOME%\bin M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.6.0
To test that hypothesis I defined me:
and the result is:Code:TestX=%TestY%\test3 TestY=%TestZ%\test2 TestZ=%JAVA_HOME%\test1
:-(Code:TestX=%TestY%\test3 TestY=%TestZ%\test2 TestZ=C:\Program Files\Java\jdk-11.0\test1
This - dear MicroSoft guys - is BUGGY! Such substitutions should/needs to work regardless of the ordering of the environment variables names! Unbelievable, that nobody at MS ever noticed and fixed this!