To install:
sudo apt-get install openjdk-6-jdk
and
sudo apt-get install openjdk-7-jdk
Somehow this leaves OpenJDK 6 as default (which is fine).
IntelliJ IDEA doesn't work with OpenJDK 6 on Linux.
Do the following
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
cd ~/Applications/ideaIC-13/idea-IC-133.696/
./bin/idea.sh
This overrides JAVA_HOME
only for this shell task.