Some things to watch out for:
There are 2 ways to install Sun Java on Red Hat/Fedora. One is via an RPM, the other is using the generic ".bin" install, which works for all Linux systems. The only thing special that the RPM does is:
1. Installs the JDK as a subdirectory tree under /usr/java
2. Makes a note in the RPM database that you've installed that particular package.
Other than the above, an install from the bin or an install from an RPM give exactly the same results. I recommend that if you do install from the bin, you move the installed JDK under /usr/java (you may have to create this directory). I like keeping my JVMs and JDKs in a common location - makes them easier to keep up with.
Modern-day releases of Fedora and Ubuntu Linux install gcj as part of the default install, and they wired it in using the Debian "alternatives" system. if you do a "ls -l /usr/bin/java", you can see part of that mechanism.
You can tell the alternatives system to use other Java implementations, though it's not pretty. However, many of the
J2EE systems reference an environment variable named JAVA_HOME, so a good way to handle this is to put something like the following in your ".bash_profile":
I'm setting up environments for
Maven and Ant at the same time. You don't have to go that far if you don't want to.