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 recently messed up badly in eclipse, so was doing some digging to update/fix jdk.

While executing java -version to find Java version on my Ubuntu 12.04, i get the below error and even on following sudo apt-get install <selected package> for any of the packages, the problem persists!!

The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install

Can any one tell me what does this mean and what is needed to be done to correct it, couldn't find much on internet about this!!

PS : i have executed sudo apt-get install openjdk-7-jre-headless and it tells that :

openjdk-7-jre-headless is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

so jre is there somewhere....what's the bug then?????

Why asking this question because eclipse is throwing this error and i need to fix jre/jdk to run it but i am total noob in this!!

A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
java in your current PATH

i was not able to login to my ubuntu account so asked the same question on SO first!!!

share|improve this question
Eclipse is trying to find Java in another path. You need to tell us how you installed eclipse. – Braiam Jan 21 '14 at 20:17
@Braiam : i just installed it using the installed directly from there. – user238370 Jan 22 '14 at 16:10
Could you append the results of locate java | grep bin/java? – Sneetsher Jan 24 '14 at 20:43

try running sudo apt-get install --reinstall openjdk-7-jre-headless

share|improve this answer
tried...this is what i got => Setting up openjdk-7-jre-headless (7u25-2.3.10-1ubuntu0.12.04.2) ... Loading classlist failed: No such file or directory ignoring dump failure Loading classlist failed: No such file or directory ignoring dump failure – user238370 Jan 21 '14 at 19:11
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Seth Jan 21 '14 at 19:57

Your Answer


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