Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am trying to run eclipse IDE which results in an error which says no java virtual machine was found. The result of running "/usr/sbin/alternatives --config java" command is that it displays - one program which provides java that is "/usr/share/java/". I have deleted that file since then trying to add a new symbolic link but to new success. I have set the path in ~/.bash-profile and ~/.bashrc even then eclipse doesn't detect the jdk. Any suggestions on installing java will be greatly appreciated.

share|improve this question
up vote 1 down vote accepted

First you want to make sure that you have java installed which you can get Here . Next you will want to add an environment variable JAVA_HOME which you can add to .bash_profile or .bashrc along with adding it to your path

export JAVA_HOME='/usr/lib/jvm/jdk1.6.0_39'


Then for eclipse you have to make sure it knows where java is. Go to Window->Preferences->Java->Installed JREs click add and select the location of your jdk. Also look at Window->Preferences->Java->Compiler and make sure that JDK Compliance matches the JDK you've installed.

share|improve this answer
That's exactly what I have done before. But that didn't work at all. – Pete Jun 21 '13 at 11:40

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.