Oracle Java 13 was released earlier this month. Debian, Ubuntu, Linux Mint, Pop! _OS and other Debian / Ubuntu based Linux distro users can now install it from the Linux Uprising Java PPA. JDK 13 will receive at least two updates, followed by Oracle JDK 14 in March 2020.
To see the enhancements in Java 13, visit annouce with Release NotesIt is worth reminding you that Oracle Java uses a commercial license (starting with Oracle Java 11), which only allows free download and use for development and testing, but you need to pay to use it in production! Therefore, I recommend using an open source JDK build, such as Zulu OpenJDK or Built with OpenJDK (As a side note, when I wrote Zulu OpenJDK, it was the only open source OpenJDK with repositories for various Linux distributions, but since then, AdaptOpenJDK has also added DEB and RPM-based Linux distributions Repository).
The Oracle Java 13 installer is based on the Web Upd8 Java package (so credit goes to the original creator), with minor modifications, and it only works for 64-bit, as Oracle only offers 64-bit downloads.
The installer will automatically download Oracle JDK 13, run update alternatives for Java binaries and man pages, and you can choose to set Oracle Java 13 as the default Java version (setting JAVA_HOME, etc.). Once Oracle stops providing public Oracle Java 13 downloads (requires a user to log in to download Oracle Java 13), I will create a new package just like I did for Oracle Java 11 (as long as it is still available and there is a new version), This will allow you to download Oracle Java 13 .tar.gz yourself and place it in a folder on your system, which the installer will then use to set everything up.
See also: How to install Oracle Java 12 (JDK 12) in Ubuntu, Linux Mint or Debian (using PPA). As a reminder, Oracle Java 12 and 10 have reached the end of the public update, so they are more available for download, so no installers for these versions are provided.
How to use APT repository on Debian, Ubuntu, Linux Mint, Pop! Oracle Java 13 (JDK 13) on _OS, etc.
Ubuntu / Linux Mint / Pop! _OS, etc .: Open a terminal and use the following command to add Linux Uprising Oracle Java PPA and install Oracle JDK 13 (64-bit only!):
sudo add-apt-repository ppa:linuxuprising/java sudo apt update sudo apt install oracle-java13-installer
su - echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main" | tee /etc/apt/sources.list.d/linuxuprising-java.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A apt-get update apt-get install oracle-java13-installer exit
oracle-java13-installer Package recommended installation
oracle-java13-set-defaultThis makes Oracle Java 13 the default Java. For example, on Ubuntu, recommended packages are installed by default, but not on Linux Mint. Below you can see how to skip the installation of this package or install it if it is not automatically installed.
To make Oracle Java 13 default, please install
oracle-java13-set-default If it was not automatically installed by the Oracle Java 13 installer:
sudo apt install oracle-java13-set-default
oracle-java13-set-default Packaging during installation
sudo apt install --no-install--recommends oracle-java13-installer
Don’t want to set Oracle Java 13 as the default anymore, but do you want to install it? Get rid of
sudop apt remove oracle-java13-set-default
You can check the default Java version using the following command
java -version with
javac -version, E.g:
$ java -version java version "13" 2019-09-17 Java(TM) SE Runtime Environment (build 13+33) Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing) $ javac -version javac 13
Download Oracle Java 13 manually
In some cases, if you are behind some firewall, router, or proxy that prevents the Oracle Java 13 installer from automatically downloading Java .tar.gz on your system, you can download the Oracle Java 13 .tar.gz file yourself. From Oracle On another computer or on the same computer, but using a web browser. Make sure that the downloaded Oracle Java 13 .tar.gz is the same version as the oracle-java13-installer package!
Once you have the Oracle Java 13 .tar.gz file, put it in
/var/cache/oracle-jdk13-installer (If the folder does not exist, create it as the root directory).
oracle-java13-installer Package (as described above), the installer will select the local Oracle Java 13 archive and use it to set everything up, instead of trying to download the Oracle Java 13 archive from the Oracle server.
Auto Accept Oracle Java 13 License
Do you want to automatically accept the Oracle Java 13 license? This may be useful for automation, such as running the Oracle JDK 13 installer in a script, etc. You can use the following command to accept the license:
echo oracle-java13-installer shared/accepted-oracle-license-v1-2 select true | sudo /usr/bin/debconf-set-selections
If this doesn’t work, try the following alternatives:
echo oracle-java13-installer shared/accepted-oracle-licence-v1-2 boolean true | sudo /usr/bin/debconf-set-selections