Is there a way to install OpenJDK 15 in Ubuntu bionic?

9,438

Solution 1

Yes, you can get Java 15 from AdoptOpenJDK PPA.

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

Then you can install Java 15 with:

sudo apt-get install adoptopenjdk-15-hotspot

For more information / options / troubleshooting : https://adoptopenjdk.net/index.html

Solution 2

openjdk-15-jdk is available from the default repositories in Ubuntu 20.10 (and later releases). You can install openjdk-15-jdk from the Ubuntu 20.10 universe repository in Ubuntu 18.04 using apt pinning. You can also install openjdk-15-jdk without apt pinning by installing Ubuntu 20.10 in a virtual machine like a KVM/QEMU (qemu-kvm) virtual machine created in Virtual Machine Manager (virt-manager).

Share:
9,438
Krzysztof Krasoń
Author by

Krzysztof Krasoń

Updated on September 18, 2022

Comments

  • Krzysztof Krasoń
    Krzysztof Krasoń over 1 year

    I would like to use newest Java (15) and I can't find it in ubuntu bionic repositories. Is there a ppa where I could get it?

  • Krzysztof Krasoń
    Krzysztof Krasoń over 3 years
    So ppa:openjdk-r/ppa is no more? I would prefer not to upgrade ubuntu to 20.10 just to get java (which shouldn't depend on the rest of system). Looks like the best option right now is to download it directly from openjdk.
  • Krzysztof Krasoń
    Krzysztof Krasoń over 3 years
    Sorry, but that was what I tried first, there is no openjdk-15 or openjdk-15-jdk-headless, there are only <= 14 versions in that ppa :(
  • karel
    karel over 3 years
    I never saw something like that before in any PPA, but you're right. I manually downloaded openjdk-15 for 18.04 from ppa:openjdk-r/ppa and there was no .deb file in the archive. The archive contained only source code. Even though PPA stands for Personal Package Archive, ppa:openjdk-r/ppa didn't package openjdk-15 for 18.04 as a deb file.
  • Krzysztof Krasoń
    Krzysztof Krasoń over 3 years
    Do you know what is the difference between adopt and the one from ppa:openjdk-r/ppa ?
  • FloT
    FloT over 3 years
    They both come from the same source code and will provide you the same Java capabilities. AdoptOpenJDK let you choose between Hotspot and OpenJ9 JVM. You can see further details here : adoptopenjdk.net/about.html or stackoverflow.com/questions/52431764/…
  • sero
    sero over 3 years
    Is there a reason for it not be available on ubuntu 20.04?
  • karel
    karel over 3 years
  • Krzysztof Krasoń
    Krzysztof Krasoń over 3 years
    @karel Well, openjdk 12, 13, 14 were available for bionic, so why not 15? A strange change.