I am facing an issue of Eclipse not picking up the VM from the PATH environment variable. I follow the below steps to reproduce the error:
Downloaded the appropriate version of Oracle's JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp
extracted it:
tar zxvf ~/Downloads/jdk-8u5-linux-x64.tar.gz ~/DEVAdded to
PATH:gedit ~/.bashrc export JAVA_HOME=/home/faizal/DEV/jdk1.8.0_05 export PATH=${PATH}:${JAVA_HOME}/binConfirmed
javais available in PATH by restarting system and executingjavain random folder in bash:cd ~ java
But when I run Eclipse, I get the error :
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: /home/faizal/DEV/eclipse-luna/eclipse/jre/bin/java java in your current PATH
I can make it work only by creating a symbolic link java in /bin to point to $JAVA_HOME/bin/java. Why is Eclipse not working without this symbolic link?
~/.profile, you cannot refer to environment variables created in~/.bashrc. So you will have to create them again in~/.profile, if required. Also, a system restart is required for the changes in~/.profileto be seen by Eclipse. – faizal Jul 13 '14 at 16:56