JAVA_HOME and PATH are set but java -version still shows the old one
While it looks like your setup is correct, there are a few things to check: The output of env – specifically PATH. command -v java tells you what? Is there a java executable in $JAVA_HOME\bin and does it have the execute bit set? If not chmod a+x java it. I trust you have source‘d your … Read more