Installing Java 11 on Ubuntu
Up to last month, installing Java 11 was only possible by either:
- Installing Oracle’s JDK (HotSpot JVM), with its business and proprietary implications.
- Downloading and manually setting up OpenJDK 11.
This still held true after Java 11’s General Availability on Sep. 24 2018.
Last month, OpenJDK’s repository was finally updated with an up-to-date package for Ubuntu using their PPA:
1 | sudo add-apt-repository ppa:openjdk-r/ppa |
Check with java -version
(although java --version
should now work, if not you are on an earlier JDK).
If Java was manually set to another version, run:
1 | sudo update-alternatives --config java |
And either select OpenJDK 11 manually, or choose 0 for auto mode, i.e automatically update when (re)installing JDK packages.