Install
The instructions below are for installing version Java 7 Update 7 (7u25). If you are installing another version, make sure you change the version number appropriately when you type the commands at the terminal.
Example: For Java 6u35 replace 7u25 with 6u35. Note that, as in the preceding example, the version number is sometimes preceded with the letter u and sometimes it is preceded with an under-bar, for example, re1.7.0_25.
- Change to the directory in which you want to install. Type:
cd /usr/local/java/
Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory for which you have write permissions - Move the .tar.gz archive binary to the current directory.
- Unpack the tarball and install Java
tar zxvf jre-7u25-linux-i586.tar.gz
The Java files are installed in a directory called
jre1.7.0_25
in the current directory.
In this example, it is installed in the/usr/local/java/jre1.7.0_25
directory.
When the installation has completed, you will see the word Done. - Delete the .tar.gz file if you want to save disk space.
Enable and Configure
To configure the Java Plugin follow these steps:
- Exit Firefox browser if it is already running.
- Uninstall any previous installations of Java Plugin.Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
- Create a symbolic link to the
libnpjp2.so
file in the browser plugins directory (On kubuntu 13.04: /usr/lib/firefox-addons/plugins)Go to the plugins sub-directory under the Firefox installation directorycd <Firefox installation directory>
Create the symbolic link (/usr/local/java/jre1.7.0_25)/plugins
ln -s <Java installation directory> /lib/amd64/libnpjp2.so
- Note: If you are upgrading your Java version then before creating new symbolic link you should remove old symbolic link to enable latest downloaded Java.