Home > Back-end >  How to Fix MAVEN ERROR: The JAVA_HOME environment variable is not defined correctly, this environmen
How to Fix MAVEN ERROR: The JAVA_HOME environment variable is not defined correctly, this environmen

Time:04-05

I am unable to get apache maven to run locally on my Windows OS & I'm not sure why. I have mapped the system environmental variables as follows & am still receiving an error when I run command mvn --version using my command prompt:

The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.

Can anyone tell me what I am missing in terms of successfully updating my system environmental variables so that I can run maven builds? Please see screenshots of how my system environmental variables & system path variables are configured:

Shows current system environment variables set up Shows current system environment path variables set up

Thank you!

CodePudding user response:

Figured it out - Turns out the users did not have permissions to access the Maven OR Java JDK folders. Updated the permissions & had no issues. Thank you!

  • Related