Skip to main content

How can I install Oracle JDK 8 from the command line?

Note that you can install openjdk 8:

yum install java-1.8.0-openjdk


However, our earlier ISO is based on Centos 5 and it's not available for that version so installing the Oracle JDK is an option. You can go to the Oracle website and download it or you can use the commands below.

Note that these commands are for jdk-8u51. Check to see of there's a newer version and use that file name instead.

If you are on our pre-4.0.1-b1903 ISO or 32 bit linux use this:

curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-i586.rpm > jdk-8u51-linux-i586.rpm

For 64 bit:

curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie"  http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.rpm > jdk-8u151-linux-x64.rpm

Install the rpm:

rpm -ivh  jdk-8u151-linux-i586.rpm

At this point you should upgrade your WiKID rpms. (There's a bug in release 4.0.3-b1903 that over-writes the JCE policy with older ones.)

If you need to upgrade or install WiKID, do so now. (There's a known-issue, our RPM overwrites the JCE Policy file.)

Now, install the JAVA encryption files:

curl -v -j -k -L -H "Cookie:oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip  > jce_policy-8.zip 

Unzip them:

unzip jce_policy-8.zip

And copy them to the correct directory:

cp UnlimitedJCEPolicyJDK8/* /usr/java/jdk1.8.0_51/jre/lib/security/

Run

java -version

and make sure it says 8. If not run:

alternatives --config java

And select 8.

 

Current rating: 1

Recent Posts

Archive

2024
2022
2021
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008

Categories

Tags

Authors

Feeds

RSS / Atom