Compile problem when switching Java versions
I am using alternatives to manager two versions of Java (1.5.0_10 and 1.6.0_16) on a RHEL5 machine. I hadn't been having any problems switching versions until just last week. When I executed "alternatives --config java" and changed the version to 1.6, I would run "java -version" but the version displayed would still be 1.5. So someone suggested removing JAVA_HOME (which had been set to the path of JDK 1.5) from the PATH environment variable. This actually solved the problem I was having but created another one. Now I am unable to compile any code (I get "-bash: javac: command not found"). I know for a fact that the path to JDK 1.6 is legit because "java -jar" is working (plus it wouldn't have even given me a version number if it had been wrong).
Any suggestions?
Thanks,
Brian