1

I am very new to Ubuntu and trying to install java on Ubuntu 20.04. I follow the instructions on https://tecadmin.net/install-java-ubuntu-20-04/ and at about 2% progress the license agreement pops up but won't let me continue. There is but clicking on it does nothing. Scrolling down to the bottom I see nothing else I can click on to allow it to continue.

Kulfy
  • 17,696
Dave
  • 11

2 Answers2

2

The license agreement comes from the Oracle Java 14 package, not the Ubuntu Java 14 package. Use the Tab and Enter keys to accept the license in the Oracle license agreement window that pops up.


There is no license agreement for the Ubuntu version of openjdk-14-jdk. Remove the non-default software sources from your /etc/apt/sources.list file with How do I restore the default repositories? and run sudo apt update to refresh the list of available software.

Now you are ready to install Java. To manually download and install openjdk-14-jdk alongside openjdk-8-jdk and openjdk-11-jdk in Ubuntu 20.04 open the terminal and type:

sudo apt update
sudo apt install openjdk-8-jdk openjdk-11-jdk
cd ~/Desktop/
wget http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jre-headless_14.0.2+12-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jre_14.0.2+12-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jdk-headless_14.0.2+12-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jdk_14.0.2+12-1_amd64.deb
sudo apt install ./openjdk-14-jre-headless_14.0.2+12-1_amd64.deb ./openjdk-14-jre_14.0.2+12-1_amd64.deb ./openjdk-14-jdk-headless_14.0.2+12-1_amd64.deb ./openjdk-14-jdk_14.0.2+12-1_amd64.deb
karel
  • 114,770
  • Thanks for your help but it still stops at the license agreement and clicking ok does nothing. – Dave Aug 01 '20 at 15:31
  • 1
    There is no license agreement for the Ubuntu version of openjdk-14-jdk. Get rid of the non-default software sources in your sources.list file with How do I restore the default repositories? and run sudo apt update to refresh the list of available software. – karel Aug 01 '20 at 15:42
  • I think OP is trying to install Oracle's Java 14. @Dave Can you please share a screenshot? – Kulfy Aug 01 '20 at 15:47
  • I think the OP is trying to install Oracle's Java 14 and is being victimized by Oracle's grasping Microsoft-liike manipulation instead of virtuously installing the Ubuntu Java 14 package. – karel Aug 01 '20 at 15:48
  • Oracle Technology Network License Agreement for Oracle Java SE



    │ You MUST agree to the license available in
    │ https://www.oracle.com/technetwork/java/javase/terms/license/javase-lice
    │ nse.html if you want to install Oracle JDK.
    – Dave Aug 01 '20 at 18:17
  • Oracle is willing to authorize Your access to software associated with
    │ this License Agreement (“Agreement”) only upon the condition that You
    │ accept that this Agreement governs Your use of the software. By
    │ selecting the "Accept License Agreement" button or box (or the
    │ equivalent) or installing or using the Programs, You indicate Your

    – Dave Aug 01 '20 at 18:17
  • @Dave Seems you're stuck on accepting the licence and unable to figure out the way to accept that. Press to select "" and then press . – Kulfy Aug 02 '20 at 09:01
0

Another approach is sdkman which gives you more flexibility down the line.

Directions are quite simple:

curl -s "https://get.sdkman.io" | bash 

from there sdk ls will show you available packages and sdk install java will install Java. Of course, there many options, those are just defaults to point you in another direction than.

I believe it's possible to use Oracle binaries with sdkman but would have to delve deeper into their documentation. The above options use open source repositories, so the licensing is very easy to deal with.