If you are using Fedora Core 4 do not install the Sun Java RPM. Install the .bin file instead. Section 6.1.8. "Java Package Recommendations" of the official Fedora Core 4 release notes
advise that if you install the RPM "Sun Java might disappear from an installed system during package upgrade operations." To install Java properly for x86 systems see the Java section of the Notes
. Also if you follow these instructions you will not have to remove gcc-java. You will be using the "alternatives" method instead.