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.
2 Answers
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

- 114,770
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.

- 1,158
sudo apt update
to refresh the list of available software. – karel Aug 01 '20 at 15:42│
│
│
│ 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
│ 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
│
│