Voilà ce que j'ai fait. Cela a fonctionné.
J'ai d'abord installé le jdk pour Java 7 comme ceci:
sudo apt-get install openjdk-7-jdk
Cela pourrait être suffisant: vérifiez et voyez si javac dans votre PATH en exécutant javac -version
Sinon, suivez la réponse de Nicholas sauf qu'au lieu de sudo update-alternatives --config javac
utilisez ceci:
sudo update-alternatives --config java
Et sélectionné Java 7 à l'invite en tapant 2
:
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
* 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode
Press enter to keep the current choice[*], or type selection number: