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

So I've downloaded jdk7 pretty much since the first day I started using Ubuntu 12.04 so that I could start using Eclipse under the most up-to-date version of java. I built and completed a project with the Java 7 library, but when I tried to run its jar via the terminal, it said Java 7 was not compatible. In the terminal, I ran

java -version

and it said I had JRE6. But how is that possible if I installed jdk7? Should I install it separately?

share|improve this question

Yes, you likely have to install it separately. If you install openjdk-7 from a 3rd-party PPA, they likely would've added the dependency on jre-7 into it. If you downloaded Oracle JDK 7, then you need Oracle JRE 7 (located here).

share|improve this answer
But the oracle website says that jre is included when you download jdk – Muhammad Khan Jul 9 '12 at 4:46
using the command whereis java, see if there are any executables in the Java 7 directory. – kroq-gar78 Jul 9 '12 at 4:58

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.