What is the alternatives system and how do I configure it?
The alternatives system is used to automatically maintain symbolic links to binary files on a priority based system. This eliminates having complex path variables and having to put all the binary files in /usr/bin.
/usr/bin/java -> /etc/alternatives/java -> /path-to-binary-files
This configuration adds a layer of abstraction so you can update, switch versions, and/or switch vendors with out breaking applications. When these binary files are installed via RPM each one has a default priority associated with it based on information about the program like version and release number. The Alternatives system will determines which program has the highest priority and assign it the master link, usually in /usr/bin.
To see a list of alternatives for a given link group, you can use the --display option. The following example shows all the alternatives for Java™:
$ /usr/sbin/alternatives --display java
If the default is not desirable, then you can manually set the symlinks to a lower-priority alternative.
# /usr/sbin/alternatives --set java /usr/lib/jvm/jre-1.4.1-ibm/bin/java
You can reset to the highest-priority alternative with --auto:
# /usr/sbin/alternatives --auto java
More information can be found in the man page for alternatives(8), man alternatives, from the command line..