I have an Ec2 instance running CentOS 7.4.1 and I'm trying to install open JDK 8 onto it. This is the command I'm using to install Java:
sudo yum install java-1.8.0-openjdk-develIt produces the following:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No package java-1.8.0-openjdk-devel available.
Error: Nothing to doThis site contains a list of the different rpm packages that are available for each distribution, CentOS 7.4 is not listed which leads me to believe that, that's why the above method did not work. Is it possible to install Open JDK 8 onto CentOS 7.4?
21 Answer
The Repository needed to be enable first before open JDK 8 could be installed.
sudo yum update
sudo yum repolist allCheck the repo id ultra-centos-7.x-openjdk exists.
sudo yum-config-manager --enable ultra-centos-7.x-openjdk
sudo yum install java-1.8.0-openjdk-develConfirm the installation using -
java -version