Archives For November 30, 1999

Oracle Java 16 was announced as a short release with 6-month support. Here’s how to install it in Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10 via PPA.

UPDATE: Oracle Java 17 has been released as the new LTS (Long Term Support Release). This tutorial also works for the new release!

New features in the release include:

  • Vector API (Incubator)
  • Enable C++14 Language Features
  • Migrate from Mercurial to Git
  • Migrate to GitHub
  • ZGC: Concurrent Thread-Stack Processing
  • Unix-Domain Socket Channels
  • Alpine Linux Port
  • Elastic Metaspace
  • Windows/AArch64 Port
  • Foreign Linker API (Incubator)
  • Warnings for Value-Based Classes
  • Packaging Tool
  • Foreign-Memory Access API (Third Incubator)
  • Pattern Matching for instanceof
  • Records
  • Strongly Encapsulate JDK Internals by Default
  • Sealed Classes (Second Preview)

The “Linux Uprising” team ppa has made the installer script, which automatically downloads and installs Oracle JDK 16 package, and sets Java 16 as the default Java version (setting JAVA_HOME, etc.) on 64-bit Ubuntu based system.

1.) Open terminal and run command to add the PPA:

sudo add-apt-repository ppa:linuxuprising/java

Type user password (no asterisk feedback) when it asks and hit Enter to continue.

2.) After adding PPA, refresh system package cache and install the script:

sudo apt update

sudo apt install oracle-java16-installer

For Java JDK 17, replace the package name so the command will be:

udo apt install oracle-java17-installer

Once the package is installed, you have to accept the license (press Tab to highlight) before starting the download process.

And after installed Oracle Java 16, check via java --version command:

(Optional) To uninstall the PPA repository, run command in terminal:

sudo add-apt-repository --remove ppa:linuxuprising/java

And remove Oracle Java 16 if you want by running command:

sudo apt-get remove oracle-java16-installer

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-local

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-local

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-set-default-local

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

This quick tutorial shows you how to easily install Oracle Java JDK 8 and/or 10 in Ubuntu 18.04 LTS via PPA.

There’s no PPA package for Oracle Java 6 and 7 since they are now only available for those with an Oracle Support account (which is not free). And Java 9 has reached end of life.

Install Oracle Java JDK 10 in Ubuntu 18.04:

The “Linux Uprising” team maintains a PPA repository that contains Oracle Java 10 installer for all current Ubuntu releases.

1. Open terminal either via Ctrl+Alt+T or by searching for ‘terminal‘ from app launcher. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:linuxuprising/java

Type your password (no asterisks while typing) when it prompts and hit Enter to continue.

2. Then run command to install the package, and accept the license before it automatically downloading and installing JDK 10:

sudo apt-get install oracle-java10-installer

Once installed, Oracle Java 10 should be automatically set as default. If not, run command:

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

3. Finally check your java version via java -version and javac -version:

Install Oracle Java JDK 8 in Ubuntu 18.04:

Webupd8 Team maintains a PPA repository that contains Oracle Java 8 installer scripts for all current Ubuntu releases.

1. Open terminal and run command to add the PPA:

sudo add-apt-repository ppa:webupd8team/java

Type your password (no asterisks while typing) when it prompts and hit Enter to continue.

2. Then run command to install Java 8 installer and accept license when it prompts:

sudo apt-get install oracle-java8-installer

Once installed, Oracle Java 8 should be automatically set as default. If not, run command:

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

Uninstall:

It’s always easy to remove the PPA packages, simply open terminal and run command:

sudo apt-get remove --autoremove oracle-java8-installer oracle-java10-installer

And launch Software & Updates -> Other Software tab to remove the PPA repositories.