Issue:
I am getting the Maven error \"The JAVA_HOME environment variable is not defined correctly\" when I run through Inno setup batch execution. Howe
Setting JAVA_HOME directory from command line worked for me!
First:
JAVA_HOME="C:\Program Files\Java\jdk1.8.0"
Or :
export JAVA_HOME="C:\Program Files\Java\jdk1.8.0"
Then try:
mvn -version
to make sure you do not get the same error. :)