I need to be using Openjdk 6 but cannot figure out how remove Openjdk 7. I used the apt-get purge command and it seems to be successful but even after installing Openjdk 6,

java -version

always returns

java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

What can I do to fix this?


You can install OpenJDK 6 using sudo apt-get install openjdk-6-jre and set it as default using sudo update-alternatives --config java and then selecting the OpenJDK 6 one.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.