If JAVA_HOME is not set how mvn --version is showing a value of it?
On my system, the mvn
program is a shell script, which performs various operations to try to guess a value for JAVA_HOME
, if a value is not already set. In particular, it examines the location of the javac
program.
However, according to the answer of a related question, what mvn
reports as "Java home" is not the value of the JAVA_HOME
environment variable: it is the value of the java.home
system proeprty