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
  • 18,154
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
  • 122,292
  • 133
  • 301
  • 332
1

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.