Installing Java on Ubuntu

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

If you're uing Ubuntu 8.10
Unfortunately the Firefox integration with software package management appears to be broken or to have gone away, so this tutorial won't work.

If you know the basics of software installation, then just install the sun-java6-plugin package.

If you need a step-by-step and also want to install a bunch of other proprietary codecs at the same time (Flash, MP3 playback, etc.), then this tutorial will help you.

If you're not using Firefox
The standard plugin folder in Ubuntu is for Firefox. If you're using Opera or Konqueror, you may have to scan for plugins or specify the proper plugins folder.

If you're using Ubuntu 6.06
The page you're looking at now assumes you're using the more recent versions of Ubuntu. If you're using 6.06, check out this guide instead.

If you're using 64-bit Ubuntu
The page you're looking at now assumes you're using x86 or 32-bit Ubuntu. If you're using 64-bit Ubuntu, check out Howto Install 32 bit Firefox with Flash w/sound and Java for AMD64

Installing Java
First, enable extra repositories. It's very important you do this first step; otherwise, you'll just be told later that Ubuntu can't find the Java plugin.

Second, visit a website that requires Java.


For this example, I visited this Doctor Who page. Click the Install Missing Plugins button.


After Firefox scans for the appropriate plugin, you'll then be prompted to install GCJ Web Browser Plugin; The Java(TM) Plug-in, Java SE 6; The Java(TM) Plug-in, Java SE 5.0; or The GCJ Web Browser Plugin (using IcedTea). Install Java SE 6.


You'll be asked if you want to install sun-java6-plugin. Say Yes.


Wait for it to download and install the file.


When the installation's complete, click Finish. Then restart Firefox in order to use Java. Now, Java should be working!

If you have suggestions or corrections for these tutorials, please post in this Ubuntu Forums thread or leave a comment on my blog.

I will not give help to people posting in the above places. If you require technical support, start a support thread on the Ubuntu Forums. That is the appropriate place to ask for help.