Howto install Oracle (Sun) Java JRE for Linux Mint

Howto install Oracle (Sun) Java JRE for Linux Mint

In this tutorial you can read how to configure java and the java browser plugin.

1. Open up the Terminal (Applications > Accessories > Terminal).

2. Copy/Paste or type the following line of code into Terminal and then press enter:

3. First remove every openjdk package including icedtea-plugin:

sudo apt-get update && apt-get remove openjdk-6-jre

Because libreoffice needs openjdk, your mint linux will automatically install openjdk-7 dependencies.
That would not be any problem for this tutorial.

Just because you can and it’s recommended:

sudo apt-get autoremove && apt-get clean

All unnecessary packages will be removed.

Install JAVA

Download the tar.gz java package for linux on and store the file in the folder Downloads.
(if you have Linux x64, download the x64 bit package, do not download the RPM!!)

1. In your terminal, run the command thats create a new subfolder in the directory opt.

2. Check if you want to create a x64 or 32 bit java directory.

32 Bit version:

sudo mkdir -p -v /opt/java/32

64-Bit version:

sudo mkdir -p -v /opt/java/64

3. Go to your download folder (where you have downloaded java).

4. Unpack it to the created subfolder.

32 Bit version:

cd ~/Downloads
tar -zxvf jre-7u9-linux-i586.tar.gz
sudo mv -v jre1.7.0_* /opt/java/32

64-Bit version:

cd ~/Downloads
tar -zxvf jre-7u9-linux-x64.tar.gz
sudo mv -v jre1.7.0_* /opt/java/64

5. The last step is to make the new JRE as default: (Check if you have 32 or x64)

32 Bit version:

sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/32/jre1.7.0_09/bin/java” 1

sudo update-alternatives –set java /opt/java/32/jre1.7.0_09/bin/java

64-Bit version:

sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/64/jre1.7.0_09/bin/java” 1

sudo update-alternatives –set java /opt/java/64/jre1.7.0_09/bin/java

Install the Firefox Plugin

1. Make for every user in his home directory a subfolder:

mkdir -v ~/.mozilla/plugins

2. Create a symbolic link, so Firefox knows where to find the java plug-in.

32-Bit version:

ln -s /opt/java/32/jre1.7.0_09/lib/i386/ ~/.mozilla/plugins/

64-Bit version:

ln -s /opt/java/64/jre1.7.0_09/lib/amd64/ ~/.mozilla/plugins/

3. Now you have to restart the browser and check in Firefox if the installation has been succeeded.

Type in the browser: about:plugins


A good thing to do is to set a maximum amount of disk space for the cache.



Click on settings under temporary Internet files and set amount the disk space to 50MB.

Note: do this step for every user account.