Thanks. I read this article to update java on my Ubuntu.
And it is working.
Make sure the Universe package repository is enabled, since that is where Java is downloaded from. Open the Main Menu and go to "System" > "Administration" > "Synaptic Package Manager." Enter your password, and then, when the program comes up, open "Settings" > "Repositories" from the menu at the top of the window. Check the box next to "Community-maintained Open Source software (universe)" if it is not already. Close Synaptic when you're done.
Open the Terminal (Main Menu: "Accessories" > "Terminal") and enter the following:
<code>sudo apt-get install sun-java6-jre sun-java6-plugin</code>
Enter your password at the prompt, and wait while the Sun Java runtime environment and web-browser plugin are installed. You will then be shown the license agreement. Press "Tab" and "Enter" to select "OK" and then "Tab" and "Enter" again to select "Yes."
Set your default Java runtime to Sun's version by entering the following in the Terminal:
<code>sudo update-java-alternatives -s java-6-sun</code>
Now all Java programs will use the Sun Java 6 runtime.