I have just struggled with identical problem. In case of MacOS installation simple ​export JAVA_HOME=...
may not be sufficient due to default sudo security restrictions (at least this was the case on my MacOS 10.12).
​By default sudo
environment inherits only subset of current process environment variables. There is no JAVA_HOME among them so when you start Installation Manager it will fail at one of the first prerequisites checks with following error:
The JAVA_HOME environment variable is pointing to an invalid version of Java. Install Oracle JDK and update the JAVA_HOME environment variable to contain the path of the JDK installation directory.
The JAVA_HOME environment variable is pointing to a directory that does not contain a java that was vended by Oracle Corporation or SunMicrosystems Inc.
Update JAVA_HOME so that java.vendor is set to either Oracle Corporation or Sun Microsystems Inc.
Solution to this problem is to edit sodoers file (sudo visudo
) and add one more line to Defaults
section. In my case it was:
##
## Defaults specification
##
Defaults env_reset
Defaults env_keep += "BLOCKSIZE"
Defaults env_keep += "COLORFGBG COLORTERM"
[...]
# Newly added line
Defaults env_keep += "JAVA_HOME"
Once this was done installation went smoothly.