In Linux (Debian/Ubuntu) this can be solved by selecting a Java 1.8 SDK in
sudo update-alternatives --config javac
Changing JAVA_HOME
env variable directly does not seem to have any effect.
EDIT: responding to the comments: This probably has something to do with the fact that new Debian (and apparently Ubuntu) Java installations through the package manager do not use the JAVA_HOME
enviroment variable to determine the location of the JRE. See this and this post for more info.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…