The various versions Java is stored in /usr/jdk folder.
After downloading the .sh file to your folder run the following:
chmod +x jdk-6
to make the file executable.
change to root, then change directory to /usr/jdk
After that, run the script. so assuming the file is in /export/home/strovek/, type
This will extract the every to the folder, in this case to /usr/jdk/jdk1.6.0_16
Then remove the existing symbolic link /usr/java and replace it with the new link
ln -s jdk/jdk1.6.0_16 /usr/java
To verify, just type
Note that there is already symbolic link in /usr/sbin for java, javac etc that points to /usr/java.