I had a rude surprise last night after revising and recompiling some Java code: the compiler was, as intended, OpenJDK 7, but the interpreter was OpenJDK 6. So the program barfed.
OpenJDK 7 had previously been installed in the normal way (sudo apt-get install openjdk-7-jdk openjdk-7-source openjdk-7-doc), so that wasn't the problem. The problem was that in /etc/alternatives, some of the tools linked to JDK 6, and some to JDK 7. Blech. An obvious quick fix was to write a script to update all the soft inks, pointing all to OpenJDK 7. This seemed like a hack (in the original CS sense, where a hacker is a careless or unskilled programmer), so I decided to "do it right."
Uninstalling OpenJDK 7, uninstalling OpenJDK 6, and then re-installing OpenJDK 7 seems to have fixed things.