Installing the Java Runtime Environment
First you need to check multiverse repository enabled or not after that open a terminal window. Since you are going to be installing the JRE and the web browser plug-in, you’ll be using the following command from a terminal
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
The following NEW packages will be installed:
java-common odbcinst1debian1 sun-java6-bin sun-java6-fonts sun-java6-jre
Once it downloads the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue. You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing. ( Press TAB untill Ok Button will turn RED and Hit Enter )
Testing Java Runtime Environment
You’ll want to confirm that your system is configured properly for Sun’s JRE.
check that the JRE is properly installed by running the following command from a terminal.
You should get similar output
java version “1.6.0_06”
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
Testing Java Plugin for Firefox
open Firefox and typing about:plugins in the address bar and check for java plugin