DEV Community

Discussion on: Install and manage multiple Java versions on Linux using alternatives

Collapse
 
thegroo profile image
Marcos Maia

Hum.... most likely you have in one of these files under your $HOME folder: .bash_profile, .bashrc, .zshrc or similar a configuration setting the $JAVA_HOME specifically to an existing installation? If you have I would recommend you to remove the entry and source the file or restart / login again to see if it's gone. In most cases you don't really need a $JAVA_HOME hardcoded in your profiles(with some exceptions).

If you type only env in your terminal you should see all existent variables in your machine.