Jump to content

Installing Java


Recommended Posts


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 ^jre

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




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-


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). 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...