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:
/usr/lib/eclipse/jre/bin/java
java in your current PATH
i was not able to login to my ubuntu account so asked the same question on SO first!!!
software-center
....it installed directly from there.locate java | grep bin/java
?