Veja como isso é feito:
# Must install 7 first or else when uninstalling six, it will try to install a bunch of replacement gcj stuff.
sudo apt-get install openjdk-7-jdk
sudo apt-get remove openjdk-6-jre
sudo apt-get remove openjdk-6-jre-lib
Depois:
> java -version
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)