If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!
The language itself derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. JavaScript, a scripting language, shares a similar name and has similar syntax, but is not directly related to Java.
Currently Ubuntu has the following Java packages
sun-java6-bin - Contains the binaries
sun-java6-demo - Contains demos and examples
sun-java6-doc - Contains the documentation
sun-java6-fonts - Contains the Lucida TrueType fonts from the JRE
sun-java6-jdk - Contains the metapackage for the JDK
sun-java6-jre - Contains the metapackage for the JRE
sun-java6-plugin - Contains the plug-in for Mozilla-based browsers
sun-java6-source - Contains source files for the JDK
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
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.

Testing Java Runtime Environment
You’ll want to confirm that your system is configured properly for Sun’s JRE. This is a two-step process.
First, check that the JRE is properly installed by running the following command from a terminal.
java -version
You should get similar output

Testing Java Plugin for Firefox
open Firefox and typing about:plugins in the address bar and check for java plugin





this is very helpful for me keep going and good luck.
I ran your install command and ended up with the agreement text you show above. However, selecting and hitting Enter did nothing at all. I’ve downloaded a heap of stuff and don’t know what to do with it or even how to get rid of it. What should I do now?
John, read my old comment (july? last year, use “Older comments” above) how to work around.
Oh, here it is:
This is how I worked around the problem:
Open a terminal window.
sudo apt-get -f install
sudo apt-get -update
Sometimes you need to run
sudo apt-get -update
a couple of times - this should clean up
Start (from menu)
System -> Administration -> Synaptic Package Manager
In the upper left corner you see the word
All
if it isn’t already selected, click on it (the word then gets highlighted)
In search window write
jre
Select
Install
John,
Should you ever have this problem installing from the terminal, hit the tab key first to highlight the or key, then hit Enter.
Thanks John.St - I’ll try it a bit later when I’m at my Linux computer.
Hey ..
This is very helpful.
Keep posting ..
the above steps working fine.but how long it takes to show the “yes no” dialog box ? i was waiting for 15 minutes after i got the “operator license aggrement” . . . . . .