Install Oracle JRE 7 on Ubuntu

Below steps will show you how to Install Oracle Java JRE 7 on Ubuntu Precise.

1.Download 32bit or 64bit JRE 7 .tar.gz file from  here ,

(jre-<Version>-linux-i586.tar.gz is for 32bit ubuntu and jre-<Version>-linux-x64.tar.gz is for 64bit ubuntu,how to check 32bit or 64bit ubuntu you are running)

2.Open a Terminal,run below commands to unzip JRE 7 zip file to /usr/lib/lvm directory

sudo mkdir -p /usr/lib/jvm

For 32bit:

sudo tar -xf jre-7u4-linux-i586.tar.gz -C  /usr/lib/jvm

For 64 bit:

sudo tar -xf jre-7u4-linux-x64.tar.gz -C /usr/lib/jvm

3.Run below command

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.7_04/bin/java" 1

4.Run below command to enable the JRE 7 we just installed.

sudo update-alternatives --config java

(Note:select the number with path /usr/lib/jvm/jre1.7_04 then click Enter)
5.Run command java -version to verify your isntallation

java -version

6.Install JRE 7 in Firefox as plugins

mkdir ~/.mozzila/plugins

For 32 Bit:

ln -sf /usr/lib/jvm/jre1.7_04/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/

For 64 Bit:

ln -sf /usr/lib/jvm/jre1.7_04/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

One thought on “Install Oracle JRE 7 on Ubuntu

  1. _zero

    Hi, thanks to your blog and i solved my problem with “install jre7 on Ubuntu”.
    But i have a question with the 3 step:

    sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jre1.7_04/bin/java” 1
    # what does the last “1” stand for ?

    I look for the man of update-alternatives, but i can’t find it. I’m new to this field so i hope listen your explain. Thanks in advance.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *