In Ubuntu:
(as root)
% mkdir /usr/lib/jvm % cd /usr/lib/jvm % cp /data/download/jdk-6u33-linux-x64.bin . % chmod a+x jdk-6u33-linux-x64.bin % ./jdk-6u33-linux-x64.bin % mv jdk1.6.0_33/ sun-java6-jdk
% update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/sun-java6-jdk/bin/java" 1 % update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/sun-java6-jdk/bin/javac" 1 % update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/sun-java6-jdk/bin/javaws" 1 % update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/sun-java6-jdk/bin/jar" 1 % update-alternatives --config java