JAVA_HOME is not working for Maven

2.2k views Asked by At

I have tried setting up my JAVA_HOME with the path I have got from using the command where Java. But still when I am trying to launch mvn.bat it's not working. I have tried setting up JAVA_HOME with all the below paths:

  1. C:\Program Files\Java\jdk1.8.0_25
  2. C:\Program Files\Java\jdk1.8.0_25\bin
  3. C:\ProgramData\Oracle\Java\javapath\java.exe

But none seems to work when using mvn.bat. Anyone any help please? I am using Windows 7 x86.

1

There are 1 answers

0
Soumik Deb On

Thanks every one. After I have set up the Path and M2 variable in my system variables it's now working. Previously I although I had JAVA_HOME and M2_HOME set up on my system, I did not have Path pointing to same location as does JAVA_HOME. Neither I had M2_PATH enabled. Now all fine. Thanks everyone