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

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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