Fix issue where JAVA_HOME/bin/java is not the same as the java on the path.
Pro-actively fix potential similar issue with Maven.