arifin,
I suppose you followed the instructions in the link I wrote.
For Kaffe, I don't have it by default, I have Kanotix which is Debian based distribution and it came with Sun JRE 1.4, anyway, if you installed jdk 1.5 or 1.4 as in the instructions in the link, you can execute (as root):
# update-alternatives --config
java and
# update-alternatives --config javac
As I remember you can choose a number represent which java or javac, then see what java -version says.
For uninstalling, in the link says:
If you wish to remove some of the JRE/JDKs you have installed, execute (example: for Sun JRE 1.4.2):
# apt-get remove sun-j2re1.4
It is not that complicated really, if you just follow the instructions, everything should work for you.
As for how to set JAVA_HOME variable I didn't need to set it for eclipse or Netbeans, but as i remember IntelliJ require it and i opened /etc/bash.bashrc (this is a file in /etc directory) and i append to the end these two lines:
JAVA_HOME="/usr/lib/j2sdk1.5-sun"
export JAVA_HOME
Maybe there is a better way to do it, but it worked for me.