Execute below commands:

sudo yum update
#yum update will update every currently installed package
sudo yum install java-1.8.0
# install openjdk java runtime

Java path will be
/usr/lib/jvm/jre-1.8.0-openjdk.x86_64

Install Java compiler if needed.
sudo yum install java-1.8.0-openjdk-devel
#install's java compiler level if needed.

Remove Java 1.7.0 openjdk if exists.
sudo yum remove java-1.7.0-openjdk