To install Java on Linux, we sometime needs to use rpm package and alternatives command.
Here are useful links:
alternatives --config java
This command shows the java installed on the machine.
You should check what you already have before install a package.
Downloading Java from oracle.com requires you to sign the agreement first.
This site describes how to by pass it.