Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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/libgcj-java-placeholder.sh". 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

1 Answer 1

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'

export PATH=$JAVA_HOME/bin:$GRAILS_HOME/bin:$PATH

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. –  Ajit Peter Jun 21 '13 at 11:40

Your Answer

 
discard

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.