There is only one time when you need to reboot a Linux machine, and that's when you upgrade the kernel itself.
When you (or anybody/anything) executes a program from a shell without specifying an absolute path to the program file, the shell uses the PATH environment variable to find the program. It doesn't matter how PATH is set -- all that matters is the value in the shell where the program is run.
There's a global file /etc/profile which contains settings that can apply to all users; PATH is sometimes set there. Then individual users have their own shell startup files in their home directory: they may have .bashrc, .bash_login, .bash_profile, and/or .profile. Depending on how things are set up, setting PATH in any one of these would work.
Likewise, many Java codes like to have the JAVA_HOME environment variable set; it's used by scripts that start Java programs, though, not by the shell or any other Linux things.
Anyway, look at /etc/profile. If there's a PATH variable that mentions Java, edit it as root to change it, then open a new shell window and try "java -version" again. If there's a JAVA_HOME in /etc/profile, you can fix that too.
Otherwise, look in your own home directory for the hidden file .bashrc, and possibly make those changes there.
I didn't see that the path in /etc/profile mention the java directory at all.
On my VPS, I have a /home directory where I keep all my hosted domains. In the root directory, using CuteFTP Pro (which I think sees hidden files), I didn't see any bash files. I also looked in each of the home directories.
I'm not sure how much you've modified but maybe you want to figure out where the JDK is actually located. I usually keep mine in /opt/java, then symlink to /opt/jdk1.whatever. Try doing ls -l `which java` because maybe that will reveal the symlink and you can find the 1.4.2 folder. When in doubt, I would really consider removing the java RPM you've got, then placing your JDK in /opt/ (or any other place that is convenient) then modifying the /etc/profile as previously suggested. I would never leave a package management system (such as Redhat's RPM) in control of Java's SDK because it always adds variables that may or may not be to your liking. Also, if you want to see hidden files, use putty and 'ls -a'
The Sun JDK RPM does not set any magic Windows registry-style information or do funny things to your filesystem. It does one and only one thing, which is explode an archive into a directory named /usr/java/xxxxxx, where, for example, JDK 188.8.131.52 is named /usr/java/j2sdk1.4.2_12 and JDK 1.5.0 would be /usr/java/jdk1.5.0.
Although recent Fedora systems have included the Debian "alternatives" system for making Java available to apps, I don't think that was in RH9. Fortunately, since I hate it. Instead, you can assign a JDK or JRE to each app on a per-app basis. Normally this is done by pointing the JAVA_HOME environment variable to the jdk or JRE you want. Since Red Hat is geared towards unattended startups, most init-script services (such as the Tomcat RPM) will have a place to get that setting so you don't have to edit the init scripts. For example, /etc/tomcat4/tomcat.conf or something like that.
For development, I normally set a default in my ~/.bash_profile script, where I also set other useful things like ANT_HOME. And, of course, add $JAVA_HOME/bin and $ANT_HOME/bin to my PATH.
In short, you can be running as many different versions of Java as you like. It's all in how you set them up.
Customer surveys are for companies who didn't pay proper attention to begin with.