Ubuntu has huge repositories, which include java and the java plugin for firefox. Remove the java that you installed manually. Then make sure you have the universe and multiverse repositories enabled (system > administration > software_sources). Then just open a terminal and run:
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
Or open synaptic package manager and search for and install those 2 packages.
Then restart Firefox.