Downloading Java RPM from wget

This is a very basic post, but I consider it for myself rather for public consumption. I needed to download the Java RPM from the Oracle website from command line, as I’m connected to my systems from a low bandwidth site.

I needed to find the cookies that Oracle website uses for “accepting” Oracle license to use properly wget from command line. Here it is:

wget --no-cookies --no-check-certificate --header "Cookie:; oraclelicense=accept-securebackup-cookie"

And below the commands to set right alternatives in CentOS/RHEL:

alternatives --install /usr/bin/java java  /usr/java/jdk1.7.0_71/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar  /usr/java/jdk1.7.0_71/bin/jar 2
alternatives --install /usr/bin/javac javac  /usr/java/jdk1.7.0_71/bin/javac 2
alternatives --set javac /usr/java/jdk1.7.0_71/bin/javac

One thought on “Downloading Java RPM from wget

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: