2

Is there a way to install OpenJDK 10 on Ubuntu 19.04? Is there maybe a ppa available for that?

Since 19.04, there is only OpenJDK11 and 12 available.

kerner1000
  • 4,230

2 Answers2

3

OpenJDK 10 was non-LTS version of Java which has now its EOL in September, 2018. That means no future updates or fixes would be provided for this version. The JDK tarball can still be downloaded from OpenJDK archives and configured. To install OpeJDK 10 follow the steps below:

  • Download the tarball

    wget https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz
    
  • Unpack tar

    tar -xvf openjdk-10.0.2_linux-x64_bin.tar.gz
    
  • Move the extracted folder to /usr/lib/jdk

    sudo mkdir -p /usr/lib/jdk
    sudo mv jdk-10.0.2 /usr/lib/jdk
    
  • Update alternatives

     sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jdk/jdk-10.0.2/bin/java" 1 
     sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jdk/jdk-10.0.2/bin/javac" 1
    
  • Configure

    sudo update-alternatives --config java
    sudo update-alternatives --config javac
    
  • Verify the version

    $ java -version
    openjdk version "10.0.2" 2018-07-17
    OpenJDK Runtime Environment 18.3 (build 10.0.2+13)
    OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
    
Kulfy
  • 17,696
0

I solved this by manually downloading the files from here

https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa

openjdk-10-jdk_10.0.2+13-1_16.04.6_amd64.deb
openjdk-10-jdk-headless_10.0.2+13-1_16.04.6_amd64.deb
openjdk-10-jre_10.0.2+13-1_16.04.6_amd64.deb
openjdk-10-jre-headless_10.0.2+13-1_16.04.6_amd64.deb

Then I installed them like this:

sudo dpkg -i openjdk*.deb

kerner1000
  • 4,230