June 24, 201411 yr PART ONE What is installed? (This is for a x86_64 machine) rpm -qa | grep ^jre # jre-1.7.0_40-fcs.x86_64 [dhosang@localhost ~]$ rpm -qa | grep ^jrejre-1.7.0_40-fcs.x86_64 check and download latest and greatest at www.java.com to /usr/java/ At the time of this article the latest is: jre1.7.0_60 [dhosang@localhost ~]$ cd /usr/java[dhosang@localhost ~]$ sudo rpm -Uvh jre-7u60-linux-x64.rpm PART TWO Check which java is set [dhosang@localhost ~]$ sudo /usr/sbin/alternatives --config java password for dhosang: There is 1 program that provides 'java'. Selection Command-----------------------------------------------*+ 1 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/bin/java Check which plugin is set [dhosang@localhost ~]$ sudo /usr/sbin/alternatives --config libjavaplugin.so.x86_64 If /usr/sbin/alternatives shows a wrong item remove it [dhosang@localhost ~]$ sudo /usr/sbin/alternatives --remove libjavaplugin.so.x86_64 /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so Install the newest one [dhosang@localhost ~]$ sudo /usr/sbin/alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jre1.7.0_60/lib/amd64/libnpjp2.so 1 Note: Remember, you've got to check alternatives --config java and alternatives --config libjavaplugin.so.x86_64 everytime you update java-1.7.0-openjdk and switch it back to java (oracle).
Create an account or sign in to comment