Can I suggest that you get a newer distro?
Fedora Core 5 is the most recent in the Redhat Line, Redhat 9 is about 4 years old and you will have problems installing most recent software on it.
As for Java, I have instructions
Here. A simple search of Google or these forums would have turned up an answer for you - Sun's website also has info for installing Java under Linux.
I hope this helps
--Ian