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.

  • 2
    Possible duplicate of How do I install Java? – vidarlo Apr 23 '19 at 19:01
  • No, because since 19.04, only OpenJDK 11 is available. – kerner1000 Apr 24 '19 at 5:13
  • The duplicate mentions OpenJDK in one of its answers... – Fabby Apr 27 '19 at 21:43
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)
    
| improve this answer | |
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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.