How to Install Oracle Java 11 in Ubuntu 18.04/18.10

November 27, 2018 — Leave a comment

This quick tutorial shows you how to easily install the latest Oracle Java 11 LTS in Ubuntu 18.04, Ubuntu 18.10, Ubuntu 16.04, Ubuntu 14.04 via PPA.

Thanks to the “Linux Uprising” team PPA, an installer script is available to automatically download java package from Oracle web server, and install it in on your system.

1. To add the PPA, open terminal either from app launcher or by pressing Ctrl+Alt+T on keyboard. When it opens, run command:

sudo add-apt-repository ppa:linuxuprising/java

Type user password (no asterisks feedback) for sudo prompt and hit Enter.

2. Then run commands to install the script to start downloading and installing Java 11 on your Ubuntu:

sudo apt-get update

sudo apt-get install oracle-java11-installer

For Ubuntu 18.04 and higher, skip sudo apt-get update command since it’s done after adding PPA.

Before getting started, you must accept the license (press Tab to highlight OK and hit Enter).

3. If you have installed multiple Java versions, install (or remove) oracle-java11-set-default package to set (or not set) Java 11 as default.

sudo apt-get install oracle-java11-set-default

Finally check Java version via java -version:

Uninstall:

To remove Oracle Java 11, run command to remove the installer script:

sudo apt-get remove oracle-java11-installer

And go to Software & Updates -> Other Software to remove the PPA repository.

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to ubuntuhandbook1@gmail.com

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*