Installing Java on Ubuntu

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 7.04 or earlier
The page you're looking at now assumes you're using Ubuntu 7.10 and Firefox 2. If you're using 7.04 or earlier, check out this guide instead. If you're using the development version of Firefox 3, you will have to install the sun-java6-plugin manually.

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!