Java for i386
Add the hoary-extras repository (AddingRepositoriesHowto)
Search for sun-j2re1.5 in synaptic and install it.
This will configure the Firefox Java plugin.
Java on other Architechtures
Ubuntu PPC, please see: ["JavaPPC"]. Ubuntu AMD64, please see: ["JavaAMD64"].
Installing the JDK
If you want to install the Java compiler as well as the runtime environment, the easiest thing to do is to [https://java.sun.com/j2se/1.5.0/download.jsp get it directly from Sun]. Follow their [https://java.sun.com/j2se/1.5.0/install-linux.html installation instructions]; however, make sure that you use the "Linux self-extracting file" version. Converting the RPM with alien will not work.