Wednesday, September 3, 2014

install Oracle jdk on CentOS

yum groupinstall -y development

https://www.if-not-true-then-false.com/2014/install-oracle-java-8-on-fedora-centos-rhel/



alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_65/jre/bin/java 200000
 alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_65/jre/bin/javaws 200000
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/lib/jvm/jdk1.7.0_65/jre/lib/amd64/libnpjp2.so 200000
alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_65/bin/javac 200000
alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.7.0_65/bin/jar 200000



/usr/lib/jvm/jdk1.8.0_25

alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_25/jre/bin/java 300000
alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8.0_25/jre/bin/javaws 300000
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/lib/jvm/jdk1.8.0_25/jre/lib/amd64/libnpjp2.so 300000
alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_25/bin/javac 300000
alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_25/bin/jar 300000
alternatives --install /usr/bin/jvisualvm jvisualvm /usr/lib/jvm/jdk1.8.0_25/bin/jvisualvm 300000


su -i 

wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz


/usr/lib/jvm/jdk1.8.0_131

alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_131/jre/bin/java 300000
alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8.0_131/jre/bin/javaws 300000
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/lib/jvm/jdk1.8.0_131/jre/lib/amd64/libnpjp2.so 300000
alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_131/bin/javac 300000
alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_131/bin/jar 300000
alternatives --install /usr/bin/jvisualvm jvisualvm /usr/lib/jvm/jdk1.8.0_131/bin/jvisualvm 300000


No comments:

Post a Comment