Always install the current LTS version (Long-term support)
Run this command in a terminal/commandline to find out:
java -version
- Have brew installed: https://brew.sh/
- Run this command in a terminal/commandline
brew cask install java - Check if it is installed now
- Run this command in a terminal/commandline
sudo apt install default-jdk - Check if it is installed now
- Run the installer from:
https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot - Check if it is installed now