I installed jenkins on Cnetos 7 using the following:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --impor
The easiest possible fix for this issue if it is a AWS linux instance
sudo yum install java-1.8.0 -y sudo yum remove java-1.7.0-openjdk