I have recently downloaded Maven and followed the instructions given on this this page. I already have ant installed on my machine. Now, if I want to verify that Maven is in
JAVA_HOME = C:\Program Files\Java\jdk(JDK version number)
Example: C:\Program Files\Java\jdk-10
And then restart you command prompt it works.