Different to any other languages,Java applications are compiled to byte code,which is interpreted or compiled to native machine code at runtime.The JRE provides the libraries,Java virtual machine,and other components necessary for you to run applets and applications written in the Java programming language

To install the Java Runtime Environment,first you need to open a terminal window and execute following command in it:

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

It will take a few minutes to download the packages and following screen will be present to you when the installation begin,press Tab key to select OK and at the next page select Yes by arrow key to agree with DLJ license terms.

snapshot55

After the installation finish,you may want to check the JRE is installed properly,run following code at the terminal window and you will see something like this:

java -version

snapshot56

And type about:plugins in address bar of Firefox to check for java plugin.