-


New Oracle Java 11 Installer For Ubuntu Or Linux Mint (Using Local Oracle Java .tar.gz)

Oracle Java 11 local installer for Ubuntu or Linux Mint

As many of you already know, Oracle Java requires logging in to an Oracle account to download most versions (all except Oracle Java 12). A while back I created Oracle Java 11 and 12 installer packages (based on the package by Web Upd8), and a PPA for Ubuntu and Linux Mint.

Since Oracle Java 11 can't be directly downloaded from Oracle any more, the installer no longer works, so I created a new installer that requires the user to create an Oracle account, download the Oracle Java 11 .tar.gz archive (the same version as the installer), and place the archive in /var/cache/oracle-jdk11-installer-local/. After this, you can install the oracle-java11-installer-local package, and it will set up Oracle Java 11 for you.

Everything else works as before. You can install the oracle-java11-set-default-local package to set Oracle Java 11 as default for example (not only set it as default using a .jinfo file and update-alternatives, but also export the JAVA_HOME environment variable, etc.).

This was the only way I could think of to work around the fact that Oracle now requires users to create an account and login to download most Oracle Java versions. If you can think of a better way, please let me know!

I will delete the old oracle-java11-installer package since it no longer works. I recommend removing it, and using the new oracle-java11-installer-local package. Or better yet, switch from Oracle Java to OpenJDK or some other JDK build, since Oracle now uses a commercial license, and you can only use Java at no cost for development and testing, but it requires a fee to use it in production.

The Oracle Java 12 installer package still works, so I didn't create a "local" installer for it yet, but I will create a similar package when it stops working.

Related: Install The Latest OpenJDK 12, 11 or 8 in Ubuntu, Debian or RHEL Using Zulu OpenJDK Builds

These are step by step instructions for installing Oracle Java 11 using the new "oracle-java11-installer-local" package:

1. Create an Oracle account at https://profile.oracle.com/myprofile/account/create-account.jspx and sign in

2. Download Oracle JDK 11 .tar.gz archive. Make sure the Oracle JDK version you're downloading is the same as the oracle-java11-installer-local package version. E.g. the installer is currently version 11.0.3, so it can be used to install Oracle JDK 11.0.3.

3. Create a /var/cache/oracle-jdk11-installer-local/ folder, and copy the Oracle JDK 11 .tar.gz to this folder.

For example, create the /var/cache/oracle-jdk11-installer-local/ folder and copy jdk-11.0.3_linux-x64_bin.tar.gz to this folder (from the current directory) using:

sudo mkdir -p /var/cache/oracle-jdk11-installer-local/
sudo cp jdk-11.0.3_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/

4. Purge the old oracle-java11-installer package if you had it installed:

sudo apt purge oracle-java11-installer

5. Add the Linux Uprising Java PPA (it works on Debian, Ubuntu, Linux Mint, Pop!_OS, elementary OS, and any other Debian or Ubuntu based Linux distribution) and install the oracle-java11-installer-local package to set up Oracle Java 11:

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt install oracle-java11-installer-local

6. This is optional. Use the command below to install oracle-java11-set-default-local, which makes Oracle JDK 11 default:

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