title: Apache maven not working in cmd
body: <p>Recently I downloaded the apache maven 3.3.9 zip and extracted it to my D:\ directory but when I run mvn -version or mvn in cmd sometimes it gives me the error <code>mvn is not an internal or external command</code> and sometimes JAVA_HOME is not set properly. However I checked by <code>echo %JAVA_HOME%</code> that it points to the right location of my jdk which is in my C:\ directory. I also inserted variables in user and environment variables. I run cmd as administrator. I have tried almost everything but nothing works. Can anyone please tell me how to fix this problem? It would be really appreciated. Thanks.</p>