It seems cordova uses javac
to identify the version and not java
.
So the command that really shows the version cordova gets when looking for Java is:
javac -version
In my case, even though I had identical versions to what you have in your environment, it turned out my javac
was pointing to a newly updated Java (from Ubuntu updates)
To fix it, I used the update-alternatives
command and set javac
back to my 1.8.0 version as follow:
sudo update-alternatives --config javac
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…