How to Update Java in Ubuntu

Ubuntu comes preinstalled with the OpenJDK Java runtime to allow you to run Java programs and applets. However, this does not work in all instances. If you are experiencing problems with your Java programs, it is recommended that you install the official, closed-source Sun Java runtime and update your system to use it.

Instructions

    • 1

      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.

    • 2

      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."

    • 3

      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.

Related Searches:

References

Resources

Comments

You May Also Like

Related Ads

Featured