If you want the Oracle JDK and are willing not to use yum/rpm, see this answer here:
Downloading Java JDK on Linux via wget is shown license page instead
As per that post, you can automate the download of the tarball using curl and specifying a cookie header.
Then you can put the tarball contents in the right place and add java to your PATH, for example:
curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz > jdk.tar.gz
tar xzvf jdk.tar.gz
sudo mkdir /usr/local/java
sudo mv jdk1.8.0_45 /usr/local/java/
sudo ln -s /usr/local/java/jdk1.8.0_45 /usr/local/java/jdk
sudo vi /etc/profile.d/java.sh
export PATH="$PATH:/usr/local/java/jdk/bin"
export JAVA_HOME=/usr/local/java/jdk
source /etc/profile.d/java.sh