1

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.

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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.