Install Oracle Java 7 on Linux Mint 13

This tutorial will show you how to install Oracle Java 7 on Linux Mint 13. By default, Linux Mint 13 already equipped with OpenJDK Java JRE. But in case you want to change Linux Mint 13 to use Oracle Java 7 instead of OpenJDK, this tutorial will show you how to do that. So the objective of this tutorial is to remove IcedTea web plugin  on Linux Mint 13 and install Oracle Java 7 on Linux Mint 13.

Before we go any further, you may need to download the latest package of Oracle 7 for Linux. Go to this web address and select Oracle Java (JRE) for Linux 32 bit/64 bit and select .tar.gz package. You will have a file called: jre-7u7-linux-i586.tar.gz. Save that file for later use.
Remove IcedTea web plugin from Linux Mint 13. 
In order to avoid conflict, I prefer to remove the default OpenJDK web java plugin from my computer. I go to Synaptic Package Manager and remove any IcedTea-plugin installed. 
Now, we can start installing Oracle Java 7 on Linux Mint.
Extract the file jre-7u7-linux-i586.tar.gz
tar xzvf jre-7u5-linux-i586.tar.gz
It will produce a directory such as: jre1.7.0_05
Next execute this command to create a new directory /usr/java and move the folder to the new dir.
sudo mkdir /usr/java
sudo mv jre1.7.0_05 /usr/java
Now we need to create a symlink to the java binary
sudo ln -s /usr/java/jre1.0.5_05/bin/java /usr/bin/java
If the file /usr/bin/java already exist (created by OpenJDK), we can remove or rename it first
sudo cp /usr/bin/java /usr/bin/java_backup
sudo ln -s /usr/java/jre1.0.5_05/bin/java /usr/bin/java
Now check java version
java -version
The output:
mint@mint ~ $ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)
At this point, Oracle Java 7 is installed on Linux Mint 13. Now we need to add java plugin to Mozilla Firefox or Google Chrome.
Still on Terminal, type this command
mkdir /home/fitri/.mozilla/plugins
cd /home/fitri/.mozilla/plugins
ln -s /usr/java/jre1.7.0._05/lib/i386/libnpjp2.so
Now check if java plugin is enabled on Firefox. Type about:plugins on Firefox and make sure you see Java(TM) Plug-in 1.7.0_05 is listed there. 
Note: 
Change jre1.7.0_05 with your actual version
Change fitri with your own user name