Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran the script here: and it succeed. But why do I get:

ryan@palms ~ $ /usr/lib/jvm/java-6-openjdk/bin/java -version
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1ubuntu1)
OpenJDK Server VM (build 23.2-b09, mixed mode)
share|improve this question
Have you run sudo update-alternatives --config java? – Terry Wang May 27 '13 at 1:00
up vote 1 down vote accepted

You must change your default java.

  • sudo update-alternatives --install "/usr/bin/java" "java" "/full/path/to/bin/java" 1
  • sudo update-alternatives --config java

More details here.

share|improve this answer

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.