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've been using jdk6 on ubuntu 12.04. I was trying to update my jdk to 7. I installed jdk7 and also removed jdk6. Now my javac version is 1.7.0_03. but my java version is still 1.6.0_24. So I got UnsupportedClassVersionError while trying ro run my java project. How can I update my java?!

share|improve this question
Possible duplicate… if you don't need version 6, you can purge it before installing version 7 – amc Jul 4 '12 at 22:45

To install Java 7:

sudo apt-get update
sudo apt-get install openjdk-7-jre 

Install via the software center

sudo apt-get install icedtea-7-plugin

Install via the software center

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.