EDIT : Note this is for Mac users
M2_HOME
needs to be removed from the PATH
. By default, your PATH
might be picked up from one of the following files (for me, it was in ~/.profile
).
/etc/bashrc
/etc/profile
~/.bashrc
~/.bash_profile
~/.profile
~/.MacOSX/environment.plist
It might look something like this:
export M2_HOME=/Applications/apache-maven-3.2.3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
Remove the M2_HOME
variables, and any dependencies (in the example, the M2
variable uses M2_HOME
, so remove that, and the line after which uses $M2
) where ever it shows up.
[source]
Just to give more info on how this file is used, you can keep appending whatever location you want to include in the path.
For instance, if you want to include /User/batman/google-sdk
into path, then adding the below line to the end of the file will append /Users/batman/google-sdk
(in your case whatever the location of the folder is), to the PATH.
export PATH=$PATH:/Users/batman/google-sdk
.
But make sure the PATH
already has some info before the above line.