-2

I need to install Oracle JDK 11 on Ubuntu Server 18.04. I have seen many tutorials but all of those point that I need to download this repository:

sudo add-apt-repository ppa:linuxuprising/java

But it is not working. This is what I get:

Error Linuxuprising repo

Also, I need to install Open JDK 14 in the same Ubuntu machine, but I'm unable to find working instructions.

Does somebody have any hints on these issues?

LP0
  • 41
  • 2
  • 13
  • Did you tried with `update-alternatives`? – KBeDev Apr 07 '20 at 00:49
  • Yep. But I got an error when I run the Linuxuprising command above. – LP0 Apr 07 '20 at 00:51
  • There should be a package named `openjdk-11-jdk-headless` – KBeDev Apr 07 '20 at 00:53
  • Well, I saw how to install OpenJdk 11, but I need Oracle JDK and I feel kinda confused about that – LP0 Apr 07 '20 at 01:03
  • Check this link for how to install java in Ubuntu https://linuxize.com/post/install-java-on-ubuntu-18-04/ – Emmanuel Ani Apr 07 '20 at 01:05
  • Thanks. I will give a try to the install dependencies to add a repository, Hope this will be my missing step. – LP0 Apr 07 '20 at 01:11
  • Check this guide https://dzone.com/articles/installing-openjdk-11-on-ubuntu-1804-for-real . This guide mostly related to your question . This is for ubuntu desktop version means that it will also the same setup for ubuntu server 18.04. – Kaviranga Apr 07 '20 at 10:08
  • Did you know about the new [Oracle license rules](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)? – Robertiano Apr 07 '20 at 10:49
  • 1
    I'm voting to close this question as off-topic because it belongs to askubuntu.com – rkosegi Apr 07 '20 at 11:29
  • Are you sure you need the Oracle JDK? If you have a support contract with Oracle, you could ask Oracle how to install their JDK – Joni Apr 07 '20 at 12:45
  • Yes, it is a requirement to have those two versions of JDK – LP0 Apr 07 '20 at 14:04

1 Answers1

0

Actually it should be possible to just type "sudo apt-get install openjdk-11-jdk" or "sudo apt-get install openjdk-14-jdk"

This should Help you with all the OpenJDK stuff https://wiki.ubuntuusers.de/Java/Installation/OpenJDK/

nbl
  • 11
  • 2
  • When I execute sudo apt-get install openjdk-14-jdk It launches the permission window for Oracle JDK 14. What I'm doing wrong? – LP0 Apr 07 '20 at 13:35