Oracle Java 15 was released a few days ago. The installer scripts have been incorporated into the PPA of Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, and their derivatives.
Please refer to Release notes New in Oracle Java 15
of “Linux Uprising” Team PPA On 64-bit Ubuntu-based systems, I am writing an installer script that automatically downloads and installs the Oracle JDK 15 package and sets Java 15 as the default Java version (such as the JAVA_HOME setting).
1.) Open a terminal and run the command to add the PPA.
sudo add-apt-repository ppa:linuxuprising/java
Enter your user password (without asterisk feedback) when prompted and press Enter to continue.
2.) After adding the PPA, update the system package cache and install the script.
sudo apt update sudo apt install oracle-java15-installer
After installing the package, you must accept the license (press Tab to highlight it) before starting the download process.
And after installing Oracle Java 15
java --version command:
(Optional) Run the command in your terminal to uninstall the PPA repository.
sudo add-apt-repository --remove ppa:linuxuprising/java
Run the command and remove Oracle Java 15 if necessary.
sudo apt-get remove oracle-java15-installer