Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
Thanks, I just needed to set it as default – Mysteriousness Jul 23 '13 at 23:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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