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.
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
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.