You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo apt-get install openjdk-8-jdk
# don't worry, you can apt-get multiple java versions
sudo apt-get install openjdk-11-jdk
#sudo apt-get install openjdk-... <tab complete to see all available versions>
Management
# list available javas
update-java-alternatives --list # you should see 8 and 11 if you followed my instructions from above
sudo update-java-alternatives --set /path/to/java/version # you will get the right path from the previous step
# make sure to have this line in your .bashrc or .zshrc
# export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")