How to persistently set a variable in Windows 7 from a batch file?

Use setx.exe instead of set. setx PATH “%cd%;%path%;” pause Note that this sets the path for all future cmd instances, but not for the current one. If you need that, also run your original set command. UPDATE: The second parameter needs to be quoted if it contains spaces (which %path% always has). Be warned that … Read more

Setting the correct PATH for Eclipse

Like Abob said: Eclipse doesn’t consult the JAVA_HOME variable You should specify where Eclipse should find your JDK in the file eclipse.ini. Specifically, the following parameter (note that it is 2 separate lines in the ini file): -vm C:\Java\JDK\1.8\bin\javaw.exe or wherever your javaw.exe happens to be. Note: The format of the ini file is very … Read more

Extend $PATH variable in git bash under Windows

Here are two ideas. You can have your path with double quote mark. export PATH=$PATH:”/C/Program Files (x86)/apache-maven-3.3.3/bin” Or, You can also make symbolic link for the directory. ln -s “/C/Program Files (x86)/apache-maven-3.3.3/bin” ./mvnbin export PATH=$PATH:/your-path/mvnbin It works for me in mingw32 environment.