After downloading jdk-7u45-linux-x64.tar.gz and moving it to my own folder ~/java, I followed their steps here: http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html
I apparently only extracted the contents of the file, because when I ran this command:
% tar zxvf jdk-7u45-linux-x64.tar.gz
It said that it couldn't find the % command, so I removed % and ran it, then when I typed java, it output to me what it did when I first installed Ubuntu. What am I doing wrong?