I had a need to use the Sun/Oracle JDK instead of the OpenJDK supplied with Ubuntu 12.04. I found this page, and following that did the trick.
One remark: when you download the tar.gz version from Oracle, you will end up with just a .gz file. In fact it is a tar.gz file, they just mixed up the extension.
May 082013