You should have the Java Runtime Environment already, but the Development Kit comes with its own Runtime Environment, so we'll remove it.
1. Copy the files /etc/profile.d/jre.csh and /etc/profile.d/jre.sh to somewhere safe;
2. Remove the jre package ("removepkg jre"). Those files in /etc/profile.d will be removed as well;
3. If necessary, remove /usr/lib/java;
4. Get the JDK from http://java.sun.com/javase/downloads/index.jsp
5. Copy the file to /usr/lib and launch it in a console;
6. It will extract the contents into a jdk directory inside /usr/lib;
7. Inside /usr/lib, create a symlink to the new directory called java, by typing for example "ln -s /usr/lib/jdk-1.6.0_07/ /usr/lib/java";
8. Copy the previously backed up file jre.sh and jre.csh to /etc/profile.d (this will add java to your path);
9. Copy the browser java plugin from /usr/lib/jdk1.6.0_07/jre/plugin/i386/ns7/libjavaplugin_oji.so to /usr/lib/mozilla/plugins
(perhaps saving the previous plugin somewhere in case you want to go back to jre)
Not sure about non-Mozilla browsers, but it should be the same plugin, only to a different directory.